Cisco Nexus 9000v でのダイナミックルーティング設定例
CML 上の Nexus 9000v などで OSPF, EIGRP, eBGP などのダイナミックルーティングを動作させる場合の設定例をメモしておきます。
テンプレート
いずれの場合も以下を共通設定にしました。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 | hostname N9Kv
!
feature telnet
!
no ip domain-lookup
!
clock timezone JST 9 0
!
vrf context management
!
interface mgmt0
vrf member management
ip address dhcp
!
line console
exec-timeout 300
terminal length 0
!
line vty
exec-timeout 300
!
logging timestamp milliseconds
!
end
|
OSPF 設定例
VRF / 非 VRF いずれも、あまり注意点はありません。 IOS と共通ですが、Loopback に設定された /24 経路を広報する為に ip ospf network point-to-point
を定義します。
非 VRF 設定
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 | hostname N9Kv-1
!
feature ospf
feature interface-vlan
!
vlan 99
!
interface Vlan99
no shutdown
ip address 10.0.99.1/24
ip router ospf OSPF1 area 0.0.0.0
!
interface Ethernet1/1
switchport mode trunk
switchport trunk allowed vlan 99
!
interface loopback11
ip address 10.0.11.1/24
ip ospf network point-to-point
ip router ospf OSPF1 area 0.0.0.0
!
router ospf OSPF1
router-id 10.0.99.1
!
end
|
VRF 設定
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 | hostname N9Kv-2
!
feature ospf
feature interface-vlan
!
vlan 99
!
vrf context VRF1
!
interface Vlan99
no shutdown
vrf member VRF1
ip address 10.0.99.2/24
ip router ospf OSPF1 area 0.0.0.0
!
interface Ethernet1/1
switchport mode trunk
switchport trunk allowed vlan 99
!
interface loopback22
vrf member VRF1
ip address 10.0.22.1/24
ip ospf network point-to-point
ip router ospf OSPF1 area 0.0.0.0
!
router ospf OSPF1
vrf VRF1
router-id 10.0.99.2
!
end
|
EIGRP 設定例
OSPF 同様、EIGRP でもあまり注意点はありません。
非 VRF 設定
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 | hostname N9Kv-1
!
feature eigrp
feature interface-vlan
!
vlan 99
!
interface Vlan99
no shutdown
ip address 10.0.99.1/24
ip router eigrp EIGRP1
!
interface Ethernet1/1
switchport mode trunk
switchport trunk allowed vlan 99
!
interface loopback11
ip address 10.0.11.1/24
ip router eigrp EIGRP1
!
router eigrp EIGRP1
autonomous-system 65000
router-id 10.0.99.1
!
end
|
VRF 設定
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 | hostname N9Kv-2
!
feature eigrp
feature interface-vlan
!
vlan 99
!
vrf context VRF1
!
interface Vlan99
no shutdown
vrf member VRF1
ip address 10.0.99.2/24
ip router eigrp EIGRP1
!
interface Ethernet1/1
switchport mode trunk
switchport trunk allowed vlan 99
!
interface loopback22
vrf member VRF1
ip address 10.0.22.1/24
ip router eigrp EIGRP1
!
router eigrp EIGRP1
vrf VRF1
autonomous-system 65000
router-id 10.0.99.2
!
end
|
eBGP 設定例
BGP の場合は IOS と異なり、明示的に必要な address-family
を指定することが必須です。
非 VRF 設定
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 | hostname N9Kv-1
!
feature bgp
feature interface-vlan
!
ip route 10.0.11.0/24 Null0
!
vlan 99
!
interface Vlan99
no shutdown
ip address 10.0.99.1/24
!
interface Ethernet1/1
switchport mode trunk
switchport trunk allowed vlan 99
!
router bgp 65001
router-id 10.0.99.1
address-family ipv4 unicast
network 10.0.11.0/24
neighbor 10.0.99.2
remote-as 65002
address-family ipv4 unicast
!
end
|
VRF 設定
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 | hostname N9Kv-2
!
feature bgp
feature interface-vlan
!
vlan 99
!
vrf context VRF1
ip route 10.0.22.0/24 Null0
!
interface Vlan99
no shutdown
vrf member VRF1
ip address 10.0.99.2/24
!
interface Ethernet1/1
switchport mode trunk
switchport trunk allowed vlan 99
!
router bgp 65002
vrf VRF1
router-id 10.0.99.2
address-family ipv4 unicast
network 10.0.22.0/24
neighbor 10.0.99.1
remote-as 65001
address-family ipv4 unicast
!
end
|