FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.38k stars 1.26k forks source link

Commands missing in VTYSH #1636

Closed EasyNetDev closed 5 years ago

EasyNetDev commented 6 years ago

Hi,

Working for a while with FRR, I've notice missing some comands in vtysh and in saved configuration or are interpreted wrongly:

ip forwarding ipv6 forwarding ip multicast-routing ip pim ssm prefix-list ssm-range

interface XXX ip pim ssm

Even if I'm typing those commands I see that they do their effect but are not saved. Example:

R4(config)# interface ens34
R4(config-if)# no ip pim sm 
  <cr>  
R4(config-if)# no ip s
% There is no matched command.
R4(config-if)# ip pim 
  drpriority  Set the Designated Router Election Priority
  hello       Hello Interval
  sm          Enable PIM SM operation
  use-source  Configure primary IP address
R4(config-if)# ip pim ssm
WARN: Enabled PIM SM on interface; configure PIM SSM range if needed

but the configuration file:

interface ens34
 description to H1
 ip address 192.168.2.1/24
 ip igmp
 ip pim sm
!

Booting a system with integrated file (frr.conf) it doesn't starts the ip forwarding. By default is no ip forwarding.

Also command ip pim ssm prefix-list is inserting a wrong prefix-list:

R4(config)# ip pim ssm prefix-list ssm-range
R4(config)# do sh run
Building configuration...

Current configuration:
!
frr version 3.0.2
frr defaults traditional
ip pim rp 10.1.0.1 224.0.0.0/4
ip pim ssm prefix-list ip
no log monitor
hostname R4
patrasar commented 6 years ago

I am working on this issue

patrasar commented 6 years ago

Hi AdrianBan,

  1. We can remove the "ip multicast-routing" command as internally it does not do anything, by default it is already enabled on FRR.

  2. "ip forwarding" and "ipv6 forwarding" should be enabled in the file "/etc/sysctl.conf " as given below

//Uncomment the next line to enable packet forwarding for IPv4 net.ipv4.ip_forward=1

//Uncomment the next line to enable packet forwarding for IPv6 //Enabling this option disables Stateless Address Autoconfiguration //based on Router Advertisements for this host net.ipv6.conf.all.forwarding=1

  1. "ip pim ssm" command is a hidden command which internally enables pim sm on that particular interface. Thats why on that interface you are able to see pim sm as enabled. For this we are introducing one command "ip pim" which will enable pim sm on the interface and the commands "ip pim sm" and "ip pim ssm" will be hidden.

  2. I have verified the command "ip pim ssm prefix-list ssm-range" on FRR, after booting up with the saved configuration, it is coming up with correct ssm range. Please find the logs as given below.

patrasar commented 6 years ago

I have verified the pim ssm prefixlist configuration and booting up the system. Please find the logs as given below.

dev(config)# ip pim ssm prefix-list ssm-range
dev(config)# end
dev# exit
dev# show running-config 
Building configuration...

Current configuration:
!
frr version 5.1-dev-MyOwnFRRVersion
frr defaults traditional
hostname dev
log syslog informational
ip pim ssm prefix-list ssm-range
service integrated-vtysh-config
username cumulus nopassword
!
line vty
!
end
dev# write 
Note: this version of vtysh never writes vtysh.conf
2018/08/23 00:40:51 unknown: Ran out of docstring while parsing 'ip pim sm'
2018/08/23 00:40:51 unknown: Ran out of docstring while parsing 'ip pim ssm'
2018/08/23 00:40:51 unknown: Ran out of docstring while parsing 'no ip pim sm'
2018/08/23 00:40:51 unknown: Ran out of docstring while parsing 'no ip pim ssm'
Building Configuration...
Warning: /etc/frr/frr.conf.sav unlink failed
Integrated configuration saved to /etc/frr/frr.conf
[OK]

root@dev:~/frr_2# cat /etc/frr/frr.conf
frr version 5.1-dev-MyOwnFRRVersion
frr defaults traditional
hostname dev
log syslog informational
ip pim ssm prefix-list ssm-range
service integrated-vtysh-config
username cumulus nopassword
!
line vty
!
root@dev:~/frr_2# systemctl stop frr 
root@dev:~/frr_2# systemctl start frr
dev(config)# do show running-config 
Building configuration...

Current configuration:
!
frr version 5.1-dev-MyOwnFRRVersion
frr defaults traditional
hostname dev
log syslog informational
ip pim ssm prefix-list ssm-range
service integrated-vtysh-config
username cumulus nopassword
!
line vty
!
end
dev(config)# end
dev# exit
patrasar commented 6 years ago

Hi @AdrianBan, The fix is merged https://github.com/FRRouting/frr/pull/2985. As per my previous comment, pim ssm prefixlist configuration and booting up the system is not reproducible.

EasyNetDev commented 6 years ago

Hi @patrasar,

With 5.0.1 I didn't notice this issue anymore. I had old version of FRR, so could be this the issue.

Kind regards, Adrian

EasyNetDev commented 5 years ago

Hi,

Those issues were fixed.

I will close the ticket.