Last active
August 1, 2023 08:47
-
-
Save enukane/238ede585d3f974846ea0b7c4a80a2c5 to your computer and use it in GitHub Desktop.
別インタフェースでAAA.AAA.0.0/16と同じコネクティッドルートを持っているホストB(10.20.10.100)へ、AAA.AAA.0.0/16にいるホストたちが無変更でAAA.AAA.0.XX/16だと思ってアクセスするためのNEC IXコンフィグ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 外側の真正のネットワーク vrf-out vrf-in ホストBが持ってる余計なルート | |
# (AAA.AAA.0.0.0/16) -- GE0(AAA.AAA.0.XX) __ NEC-IX __ GE1(BBB.BBB.0.1) --UTPケーブルで直結-- GE2:1(BBB.BBB.0.2) __ NEC-IX __ GE2:2(10.20.10.1) -- eth0(10.20.10.100) HostB eth1 (AAA.AAA.0.0/16) | |
# | |
ip route vrf vrf-in AAAA.AAAA.0.0/16 BBB.BBB.0.1 | |
ip route vrf vrf-out default ${AAA.AAA.0.0/16のデフォゲ} | |
ip route vrf vrf-out 10.20.10.0/24 BBB.BBB.0.2 | |
ip dhcp enable | |
! | |
! | |
device GigaEthernet2 | |
vlan-group 1 port 1 | |
vlan-group 2 port 2 | |
! | |
device USB0 | |
shutdown | |
! | |
device USB1 | |
shutdown | |
! | |
interface GigaEthernet0.0 | |
ip vrf forwarding vrf-out | |
ip address AAA.AAA.0.48/16 | |
ip nat enable | |
ip nat static 10.20.10.100 AAA.AAA.XX | |
no shutdown | |
! | |
interface GigaEthernet1.0 | |
ip vrf forwarding vrf-out | |
ip address BBB.BBB.0.1/24 | |
no shutdown | |
! | |
interface GigaEthernet2:1.0 | |
ip vrf forwarding vrf-in | |
ip address BBB.BBB.0.2/24 | |
no shutdown | |
! | |
interface GigaEthernet2:2.0 | |
ip vrf forwarding vrf-in | |
ip address 10.20.10.1/24 | |
ip napt enable | |
no shutdown | |
! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment