【Nexus】Part 4 – Routingコンフィグレーション
NXOSではデータセンタースイッチとして、一般的なL3機能やRoutingプロトコルを問題なく利用可能です。
今回はNXOSにおけるRouting機能とプロコトルのコンフィグレーションについて確認したいと思います。
*Nexus9000vシリーズの記事のまとめはこちらから
*Nexus 9000vはversion 9.3(1)を元に動作確認を行っています。
目次
NXOSのおけるRouting
基本的なRoutingコンフィグレーションとして、以下のプロトコルが利用できるか確認したいと思います。
・IPv4/IPv6
・OSPF
・BGP(iBGP)
・EIGRP
・経路再配布
NXOSとIOSとのコマンド比較も行いたいので、Nexus9000vとCSR1000v3台をルーティングプロトコルごとにドメインを分けて、相互接続テストを通してコンフィグの比較と動作の正常性を確認していきたいと思います。
詳細は以下の構成図をご参照いただければと思います。
構成
構成機器
- NXOS – NXOS9.3(1)
- CSR2 – CSR1000V 15.5(3)S4b
- CSR3 – CSR1000V 15.5(3)S4b
- CSR4 – CSR1000V 15.5(3)S4b
- Linux – Ping確認用端末
本構成での確認事項
・疎通用セグメントとCSRのLoopbackをルーティングで互いに配信させて、端末から各CSRのLoopbackへの疎通確認
コンフィグレーション
NXOS -NXOS9.3(1)
hostname NXOS
feature ospf
feature bgp
feature ospfv3
feature eigrp
route-map direct-rm permit 10
match interface loopback0
route-map direct-rm permit 20
match interface Ethernet1/1
interface Ethernet1/1
no switchport
ip address 10.1.1.1/24
ipv6 address 2001:10:1:1::1/64
no shutdown
interface Ethernet1/2
no switchport
ip address 20.1.1.1/24
ipv6 address 2001:20:1:1::1/64
ipv6 router eigrp 100
ip router eigrp 100
no shutdown
interface Ethernet1/3
no switchport
ip address 30.1.1.1/24
ipv6 address 2001:30:1:1::1/64
ip router ospf 100 area 0.0.0.0
ipv6 router ospfv3 100 area 0.0.0.0
no shutdown
interface Ethernet1/4
no switchport
ip address 40.1.1.1/24
ipv6 address 2001:40:1:1::1/64
no shutdown
interface loopback0
ip address 1.1.1.1/32
ipv6 address 2001:1:1:1::1/128
router eigrp 100
address-family ipv4 unicast
redistribute direct route-map direct-rm
address-family ipv6 unicast
redistribute direct route-map direct-rm
router ospf 100
redistribute direct route-map direct-rm
router ospfv3 100
address-family ipv6 unicast
redistribute direct route-map direct-rm
router bgp 100
address-family ipv4 unicast
redistribute direct route-map direct-rm
address-family ipv6 unicast
redistribute direct route-map direct-rm
neighbor 2001:40:1:1::2
remote-as 100
address-family ipv6 unicast
neighbor 40.1.1.2
remote-as 100
address-family ipv4 unicast
CSR2 – CSR1000V 15.5(3)S4b
hostname CSR2
ipv6 unicast-routing
interface Loopback0
ip address 1.1.1.2 255.255.255.255
ipv6 address 2001:1:1:1::2/128
interface GigabitEthernet1
ip address 20.1.1.2 255.255.255.0
ipv6 address 2001:20:1:1::2/64
ipv6 eigrp 100
router eigrp 100
network 20.1.1.0 0.0.0.255
redistribute connected
ipv6 router eigrp 100
redistribute connected
CSR3 – CSR1000V 15.5(3)S4b
hostname CSR3
ipv6 unicast-routing
interface Loopback0
ip address 1.1.1.3 255.255.255.255
ipv6 address 2001:1:1:1::3/128
interface GigabitEthernet1
ip address 30.1.1.2 255.255.255.0
negotiation auto
ipv6 address 2001:30:1:1::2/64
ipv6 ospf 100 area 0
router ospf 100
redistribute connected subnets
network 30.1.1.0 0.0.0.255 area 0
ipv6 router ospf 100
redistribute connected
CSR4 – CSR1000V 15.5(3)S4b
hostname CSR4
ipv6 unicast-routing
interface Loopback0
ip address 1.1.1.4 255.255.255.255
ipv6 address 2001:1:1:1::4/128
interface GigabitEthernet1
ip address 40.1.1.2 255.255.255.0
negotiation auto
ipv6 address 2001:40:1:1::2/64
router bgp 100
bgp log-neighbor-changes
neighbor 2001:40:1:1::1 remote-as 100
neighbor 40.1.1.1 remote-as 100
!
address-family ipv4
redistribute connected
no neighbor 2001:40:1:1::1 activate
neighbor 40.1.1.1 activate
exit-address-family
!
address-family ipv6
redistribute connected
neighbor 2001:40:1:1::1 activate
exit-address-family
EIGRP ステータス確認
NXOS
NXOS# show ip eigrp nei
IP-EIGRP neighbors for process 100 VRF default
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 20.1.1.2 Eth1/2 10 05:06:01 5 50 0 8
NXOS#
NXOS# show ipv6 eigrp nei
IPv6-EIGRP neighbors for process 100 VRF default
H Address Interface Hold Uptime SRTT
RTO Q Seq
(sec) (ms)
Cnt Num
0 fe80::5200:ff:fe02:0 Eth1/2 10 05:06:09 4
50 0 8
NXOS#
NXOS# show ip route eigrp
IP Route Table for VRF "default"
'' denotes best ucast next-hop '*' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%' in via output denotes VRF
1.1.1.2/32, ubest/mbest: 1/0
*via 20.1.1.2, Eth1/2, [170/130816], 05:06:17, eigrp-100, external
NXOS#
NXOS# show ipv6 route eigrp
IPv6 Routing Table for VRF "default"
'' denotes best ucast next-hop '*' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
2001:1:1:1::2/128, ubest/mbest: 1/0
*via fe80::5200:ff:fe02:0, Eth1/2, [170/130816], 05:06:23, eigrp-100, extern
al
NXOS#
CSR2
CSR2#show ip eigrp nei
EIGRP-IPv4 Neighbors for AS(100)
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 20.1.1.1 Gi1 10 05:11:12 5 100 0 15
CSR2#
CSR2#show ipv6 eigrp nei
EIGRP-IPv6 Neighbors for AS(100)
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
0 Link-local address: Gi1 14 05:11:19 5 100 0 15
FE80::5200:FF:FE01:7
CSR2#
CSR2#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 2 subnets
D EX 1.1.1.1 [170/51456] via 20.1.1.1, 02:04:14, GigabitEthernet1
10.0.0.0/24 is subnetted, 1 subnets
D EX 10.1.1.0 [170/51456] via 20.1.1.1, 02:04:14, GigabitEthernet1
CSR2#
CSR2#show ipv6 route eigrp
IPv6 Routing Table - default - 6 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
ld - LISP dyn-eid, a - Application
EX 2001:1:1:1::1/128 [170/51712]
via FE80::5200:FF:FE01:7, GigabitEthernet1
EX 2001:10:1:1::/64 [170/51712]
via FE80::5200:FF:FE01:7, GigabitEthernet1
CSR2#
OSPF
NXOS
NXOS# show ip ospf nei
OSPF Process ID 100 VRF default
Total number of neighbors: 1
Neighbor ID Pri State Up Time Address Interface
1.1.1.3 1 FULL/DR 05:10:26 30.1.1.2 Eth1/3
NXOS#
NXOS# show ipv6 ospf nei
OSPFv3 Process ID 100 VRF default
Total number of neighbors: 1
Neighbor ID Pri State Up Time Interface ID Interface
1.1.1.3 1 FULL/DR 05:06:29 7 Eth1/3
Neighbor address fe80::5200:ff:fe03:0
NXOS#
NXOS# show ip route ospf
IP Route Table for VRF "default"
'' denotes best ucast next-hop '*' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%' in via output denotes VRF
1.1.1.3/32, ubest/mbest: 1/0
*via 30.1.1.2, Eth1/3, [110/20], 05:10:32, ospf-100, type-2
NXOS#
NXOS# show ipv6 route ospf
IPv6 Routing Table for VRF "default"
'' denotes best ucast next-hop '*' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
2001:1:1:1::3/128, ubest/mbest: 1/0
*via fe80::5200:ff:fe03:0, Eth1/3, [110/20], 05:06:33, ospfv3-100, type-2
NXOS#
CSR3
CSR3#show ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/BDR 00:00:34 30.1.1.1 GigabitEthernet1
CSR3#
CSR3#show ipv6 ospf nei
OSPFv3 Router with ID (1.1.1.3) (Process ID 100)
Neighbor ID Pri State Dead Time Interface ID Interface
1.1.1.1 1 FULL/BDR 00:00:39 8 GigabitEthernet1
CSR3#
CSR3#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 2 subnets
O E2 1.1.1.1 [110/20] via 30.1.1.1, 05:11:33, GigabitEthernet1
10.0.0.0/24 is subnetted, 1 subnets
O E2 10.1.1.0 [110/20] via 30.1.1.1, 02:12:40, GigabitEthernet1
CSR3#
CSR3#show ipv6 route ospf
IPv6 Routing Table - default - 6 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
ld - LISP dyn-eid, a - Application
OE2 2001:1:1:1::1/128 [110/20]
via FE80::5200:FF:FE01:7, GigabitEthernet1
OE2 2001:10:1:1::/64 [110/20]
via FE80::5200:FF:FE01:7, GigabitEthernet1
CSR3#
BGP
NXOS
NXOS# show ip bgp summary
BGP summary information for VRF default, address family IPv4 Unicast
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 11, IPv4 Unicast config peers 1, capable peers 1
4 network entries and 4 paths using 960 bytes of memory
BGP attribute entries [2/328], BGP AS path entries [0/0]
BGP community entries [0/0], BGP clusterlist entries [0/0]
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
40.1.1.2 4 100 181 170 11 0 0 02:27:24 2
NXOS#
NXOS# show ipv6 bgp summary
BGP summary information for VRF default, address family IPv6 Unicast
BGP router identifier 1.1.1.1, local AS number 100
BGP table version is 7, IPv6 Unicast config peers 1, capable peers 1
4 network entries and 4 paths using 1008 bytes of memory
BGP attribute entries [2/328], BGP AS path entries [0/0]
BGP community entries [0/0], BGP clusterlist entries [0/0]
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:40:1:1::2 4 100 163 146 7 0 0 02:23:10 2
NXOS#
NXOS# show ip route bgp
IP Route Table for VRF "default"
'' denotes best ucast next-hop '*' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%' in via output denotes VRF
1.1.1.4/32, ubest/mbest: 1/0
*via 40.1.1.2, [200/0], 02:22:27, bgp-100, internal, tag 100
NXOS#
NXOS# show ipv6 route bgp
IPv6 Routing Table for VRF "default"
'' denotes best ucast next-hop '*' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
2001:1:1:1::4/128, ubest/mbest: 1/0
*via 2001:40:1:1::2/128, [200/0], 02:22:28, bgp-100, internal, tag 100
NXOS#
CSR4
CSR4#show ip bgp summary
BGP router identifier 1.1.1.4, local AS number 100
BGP table version is 5, main routing table version 5
4 network entries using 992 bytes of memory
4 path entries using 480 bytes of memory
2/2 BGP path/bestpath attribute entries using 496 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 1968 total bytes of memory
BGP activity 8/0 prefixes, 8/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
40.1.1.1 4 100 156 168 5 0 0 02:29:22 2
CSR4#
CSR4#show ip bgp ipv6 unicast summary
BGP router identifier 1.1.1.4, local AS number 100
BGP table version is 13, main routing table version 13
4 network entries using 1088 bytes of memory
4 path entries using 576 bytes of memory
2/2 BGP path/bestpath attribute entries using 496 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 2160 total bytes of memory
BGP activity 8/0 prefixes, 8/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:40:1:1::1 4 100 150 166 13 0 0 02:25:06 2
CSR4#
CSR4#show ip route bgp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
a - application route
+ - replicated route, % - next hop override, p - overrides from PfR
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 2 subnets
B 1.1.1.1 [200/0] via 40.1.1.1, 02:23:46
10.0.0.0/24 is subnetted, 1 subnets
B 10.1.1.0 [200/0] via 40.1.1.1, 02:16:08
CSR4#
CSR4#show ipv6 route bgp
IPv6 Routing Table - default - 6 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
B - BGP, R - RIP, H - NHRP, I1 - ISIS L1
I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary, D - EIGRP
EX - EIGRP external, ND - ND Default, NDp - ND Prefix, DCE - Destination
NDr - Redirect, RL - RPL, O - OSPF Intra, OI - OSPF Inter
OE1 - OSPF ext 1, OE2 - OSPF ext 2, ON1 - OSPF NSSA ext 1
ON2 - OSPF NSSA ext 2, la - LISP alt, lr - LISP site-registrations
ld - LISP dyn-eid, a - Application
B 2001:1:1:1::1/128 [200/0]
via 2001:40:1:1::1
B 2001:10:1:1::/64 [200/0]
via 2001:40:1:1::1
CSR4#
疎通確認
以下の通り、Linux端末から各CSRのLoopbackまで疎通確認OK。
user@ubuntu:~$ ping 1.1.1.1 -c 3
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=255 time=2.88 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=255 time=2.92 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=255 time=2.41 ms
--- 1.1.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 2.416/2.741/2.925/0.230 ms
user@ubuntu:~$
user@ubuntu:~$ ping 1.1.1.2 -c 3
PING 1.1.1.2 (1.1.1.2) 56(84) bytes of data.
64 bytes from 1.1.1.2: icmp_seq=1 ttl=254 time=10.8 ms
64 bytes from 1.1.1.2: icmp_seq=2 ttl=254 time=6.46 ms
64 bytes from 1.1.1.2: icmp_seq=3 ttl=254 time=5.49 ms
--- 1.1.1.2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 5.499/7.590/10.811/2.312 ms
user@ubuntu:~$
user@ubuntu:~$ ping 1.1.1.3 -c 3
PING 1.1.1.3 (1.1.1.3) 56(84) bytes of data.
64 bytes from 1.1.1.3: icmp_seq=1 ttl=254 time=9.58 ms
64 bytes from 1.1.1.3: icmp_seq=2 ttl=254 time=7.10 ms
64 bytes from 1.1.1.3: icmp_seq=3 ttl=254 time=6.87 ms
--- 1.1.1.3 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 6.873/7.853/9.583/1.226 ms
user@ubuntu:~$
user@ubuntu:~$ ping 1.1.1.4 -c 3
PING 1.1.1.4 (1.1.1.4) 56(84) bytes of data.
64 bytes from 1.1.1.4: icmp_seq=1 ttl=254 time=10.0 ms
64 bytes from 1.1.1.4: icmp_seq=2 ttl=254 time=6.36 ms
64 bytes from 1.1.1.4: icmp_seq=3 ttl=254 time=6.77 ms
--- 1.1.1.4 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 6.369/7.723/10.031/1.641 ms
user@ubuntu:~$
user@ubuntu:~$ ping6 2001:1:1:1::1 -c 3
PING 2001:1:1:1::1(2001:1:1:1::1) 56 data bytes
64 bytes from 2001:1:1:1::1: icmp_seq=1 ttl=64 time=3.63 ms
64 bytes from 2001:1:1:1::1: icmp_seq=2 ttl=64 time=2.71 ms
64 bytes from 2001:1:1:1::1: icmp_seq=3 ttl=64 time=2.44 ms
--- 2001:1:1:1::1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 2.446/2.932/3.635/0.512 ms
user@ubuntu:~$
user@ubuntu:~$ ping6 2001:1:1:1::2 -c 3
PING 2001:1:1:1::2(2001:1:1:1::2) 56 data bytes
64 bytes from 2001:1:1:1::2: icmp_seq=1 ttl=63 time=7.37 ms
64 bytes from 2001:1:1:1::2: icmp_seq=2 ttl=63 time=5.43 ms
64 bytes from 2001:1:1:1::2: icmp_seq=3 ttl=63 time=5.41 ms
--- 2001:1:1:1::2 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 5.412/6.074/7.379/0.924 ms
user@ubuntu:~$
user@ubuntu:~$ ping6 2001:1:1:1::3 -c 3
PING 2001:1:1:1::3(2001:1:1:1::3) 56 data bytes
64 bytes from 2001:1:1:1::3: icmp_seq=1 ttl=63 time=7.90 ms
64 bytes from 2001:1:1:1::3: icmp_seq=2 ttl=63 time=8.60 ms
64 bytes from 2001:1:1:1::3: icmp_seq=3 ttl=63 time=6.89 ms
--- 2001:1:1:1::3 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 6.893/7.800/8.603/0.705 ms
user@ubuntu:~$
user@ubuntu:~$ ping6 2001:1:1:1::4 -c 3
PING 2001:1:1:1::4(2001:1:1:1::4) 56 data bytes
64 bytes from 2001:1:1:1::4: icmp_seq=1 ttl=63 time=6.58 ms
64 bytes from 2001:1:1:1::4: icmp_seq=2 ttl=63 time=5.84 ms
64 bytes from 2001:1:1:1::4: icmp_seq=3 ttl=63 time=6.54 ms
--- 2001:1:1:1::4 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 5.842/6.322/6.584/0.339 ms
user@ubuntu:~$
まとめ
今回はルーティングコンフィグレーションとして、IPv4/IPv6によるEIGRP、OSPF、BGPを確認してみました。問題なくピアを確立して、疎通確認を行うことができました。
コンフィグレーションの比較として、NXOSとIOSのコンフィグレーションは若干の違いはありました。しかしIOSの経験がある方であれば直感的にコンフィグレーションすることは可能だと思います。
参考URL
Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 9.3(x)
Cisco Nexus 9000 Series NX-OS Unicast Routing Configuration Guide, Release 9.3(x)