01-03-2023 03:28 PM
I have an NCS 540 Router and would like to config it as an L2 Switch. How can I set up the trunk port for the NCS540 router and turn off the routing feature? Technically, I would like to use the router as a managed switch for testing. In the diagram, PC2 and PC3 should be able to receive DHCP addresses and DNS IPs. Thank you
01-03-2023 03:42 PM
try bridge group :
01-03-2023 05:38 PM - edited 01-03-2023 05:43 PM
Hi balaji.bandii,
Thank you for your response, I followed the instruction. However, I could not get it up and running. I could not get the DHCP address assigned to PC2, and there is no route between the NCS540 and the main router. Could you please give me more details? Thanks
RP/0/0/CPU0:ios#conf
Wed Jan 4 01:12:21.013 UTC
RP/0/0/CPU0:ios(config)#interface bvI 1
RP/0/0/CPU0:ios(config-if)#ipv4 address 10.233.180.2/24
RP/0/0/CPU0:ios(config-if)#exit
RP/0/0/CPU0:ios(config)#interface GigabitEthernet 0/0/0/0 l2transport
RP/0/0/CPU0:ios(config-if-l2)#exit
RP/0/0/CPU0:ios(config-if)#exit
RP/0/0/CPU0:ios(config)#l2vpn
RP/0/0/CPU0:ios(config-l2vpn)#bridge group 10
RP/0/0/CPU0:ios(config-l2vpn-bg)#bridge-domain 1
RP/0/0/CPU0:ios(config-l2vpn-bg-bd)#interface GigabitEthernet 0/0/0/0
RP/0/0/CPU0:ios(config-l2vpn-bg-bd-ac)#exit
RP/0/0/CPU0:ios(config-l2vpn-bg-bd)#routed interface bVI 1
RP/0/0/CPU0:ios(config-l2vpn-bg-bd)#commit
Wed Jan 4 01:13:57.366 UTC
RP/0/0/CPU0:ios(config-l2vpn-bg-bd)#exit
RP/0/0/CPU0:ios(config-l2vpn-bg)#exit
RP/0/0/CPU0:ios(config-l2vpn)#exit
RP/0/0/CPU0:ios(config)#exit
RP/0/0/CPU0:ios#sh ipv4 interface br
Wed Jan 4 01:14:10.045 UTC
Interface IP-Address Status Protocol Vrf-Name
BVI1 10.233.180.2 Up Down default
MgmtEth0/0/CPU0/0 unassigned Shutdown Down default
GigabitEthernet0/0/0/0 unassigned Up Up default
GigabitEthernet0/0/0/1 10.233.180.10 Up Up default
GigabitEthernet0/0/0/2 unassigned Shutdown Down default
GigabitEthernet0/0/0/3 unassigned Shutdown Down default
GigabitEthernet0/0/0/4 unassigned Shutdown Down default
01-04-2023 01:47 AM
but this config is not complete.
you need local switching
https://www.cisco.com/c/en/us/td/docs/iosxr/ncs5000/vpn/60x/b-ncs5000-l2vpn-configuration-guide-60x/b-ncs5000-l2vpn-configuration-guide-60x_chapter_0100.html#concept_5F21477FEEBD4C99B016DBD89053DC96
01-04-2023 05:50 AM
If you like the Router act as bridge, that should BVI should be 2 interfaces. with no IP address as shown exmaple.
other side why BVI interface down(protocol) ?
post show run full config
01-03-2023 08:40 PM
Hi balaji.bandii,
Thank you for your response, I followed the instruction. However, I could not get it up and running. I could not get the DHCP address assigned to PC2, and there is no route between the NCS540 and the main router. Could you please give me more details? Thanks
RP/0/0/CPU0:ios#conf
Wed Jan 4 01:12:21.013 UTC
RP/0/0/CPU0:ios(config)#interface bvI 1
RP/0/0/CPU0:ios(config-if)#ipv4 address 10.233.180.2/24
RP/0/0/CPU0:ios(config-if)#exit
RP/0/0/CPU0:ios(config)#interface GigabitEthernet 0/0/0/0 l2transport
RP/0/0/CPU0:ios(config-if-l2)#exit
RP/0/0/CPU0:ios(config-if)#exit
RP/0/0/CPU0:ios(config)#l2vpn
RP/0/0/CPU0:ios(config-l2vpn)#bridge group 10
RP/0/0/CPU0:ios(config-l2vpn-bg)#bridge-domain 1
RP/0/0/CPU0:ios(config-l2vpn-bg-bd)#interface GigabitEthernet 0/0/0/0
RP/0/0/CPU0:ios(config-l2vpn-bg-bd-ac)#exit
RP/0/0/CPU0:ios(config-l2vpn-bg-bd)#routed interface bVI 1
RP/0/0/CPU0:ios(config-l2vpn-bg-bd)#commit
Wed Jan 4 01:13:57.366 UTC
RP/0/0/CPU0:ios(config-l2vpn-bg-bd)#exit
RP/0/0/CPU0:ios(config-l2vpn-bg)#exit
RP/0/0/CPU0:ios(config-l2vpn)#exit
RP/0/0/CPU0:ios(config)#exit
RP/0/0/CPU0:ios#sh ipv4 interface br
Wed Jan 4 01:14:10.045 UTC
Interface IP-Address Status Protocol Vrf-Name
BVI1 10.233.180.2 Up Down default
MgmtEth0/0/CPU0/0 unassigned Shutdown Down default
GigabitEthernet0/0/0/0 unassigned Up Up default
GigabitEthernet0/0/0/1 10.233.180.10 Up Up default
GigabitEthernet0/0/0/2 unassigned Shutdown Down default
GigabitEthernet0/0/0/3 unassigned Shutdown Down default
GigabitEthernet0/0/0/4 unassigned Shutdown Down default
01-04-2023 07:49 AM - edited 01-04-2023 07:49 AM
Hello @adhong ,
your BVI1 interface IP address 10.233.180.2/24 overlaps with gi0/0/0/1 IP address 10.233.180.10
gi0/0/0/1 should be configured like gi0/0/0/0 for L2 transport and it should be member of the bridge domain.
Note: if you are using gi0/0/0/1 to access the device you may want to change the IP address to something different on the BVI.
Hope to help
Giuseppe
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide