cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
600
Views
5
Helpful
6
Replies

Configure NCS540 IOS XR router function as L2 Switch

adhong
Level 1
Level 1

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  

inteladhong_0-1672788250928.png

 

6 Replies 6

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

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

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

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

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

 

 

Review Cisco Networking for a $25 gift card