mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 12:25:02 +00:00
tests: nhrp, use unified config, remove misleading error log
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
This commit is contained in:
parent
4f185c5c9d
commit
2054b49c40
@ -1,4 +1,5 @@
|
|||||||
ip forwarding
|
ip forwarding
|
||||||
|
!debug nhrp all
|
||||||
interface nhc1-eth0
|
interface nhc1-eth0
|
||||||
ip address 192.168.2.4/24
|
ip address 192.168.2.4/24
|
||||||
!
|
!
|
||||||
@ -7,10 +8,18 @@ interface nhc1-gre0
|
|||||||
ip address 172.16.1.4/32
|
ip address 172.16.1.4/32
|
||||||
no link-detect
|
no link-detect
|
||||||
ipv6 nd suppress-ra
|
ipv6 nd suppress-ra
|
||||||
|
ip nhrp holdtime 10
|
||||||
|
ip nhrp network-id 42
|
||||||
|
ip nhrp registration no-unique
|
||||||
|
ip nhrp nhs dynamic nbma 192.168.1.1
|
||||||
|
ip nhrp nhs dynamic nbma 192.168.1.2
|
||||||
|
ip nhrp nhs dynamic nbma 192.168.1.3
|
||||||
|
ip nhrp shortcut
|
||||||
|
tunnel source nhc1-eth0
|
||||||
!
|
!
|
||||||
interface nhc1-eth1
|
interface nhc1-eth1
|
||||||
ip address 10.4.4.4/24
|
ip address 10.4.4.4/24
|
||||||
!
|
!
|
||||||
ip route 0.0.0.0/0 172.16.1.1 50
|
ip route 0.0.0.0/0 172.16.1.1 50
|
||||||
ip route 0.0.0.0/0 172.16.1.2 60
|
ip route 0.0.0.0/0 172.16.1.2 60
|
||||||
ip route 0.0.0.0/0 172.16.1.3 70
|
ip route 0.0.0.0/0 172.16.1.3 70
|
@ -1,11 +0,0 @@
|
|||||||
!debug nhrp all
|
|
||||||
interface nhc1-gre0
|
|
||||||
ip nhrp holdtime 10
|
|
||||||
ip nhrp network-id 42
|
|
||||||
ip nhrp registration no-unique
|
|
||||||
ip nhrp nhs dynamic nbma 192.168.1.1
|
|
||||||
ip nhrp nhs dynamic nbma 192.168.1.2
|
|
||||||
ip nhrp nhs dynamic nbma 192.168.1.3
|
|
||||||
ip nhrp shortcut
|
|
||||||
tunnel source nhc1-eth0
|
|
||||||
exit
|
|
@ -1,4 +1,5 @@
|
|||||||
ip forwarding
|
ip forwarding
|
||||||
|
!debug nhrp all
|
||||||
interface nhc2-eth0
|
interface nhc2-eth0
|
||||||
ip address 192.168.2.5/24
|
ip address 192.168.2.5/24
|
||||||
!
|
!
|
||||||
@ -7,6 +8,14 @@ interface nhc2-gre0
|
|||||||
ip address 172.16.1.5/32
|
ip address 172.16.1.5/32
|
||||||
no link-detect
|
no link-detect
|
||||||
ipv6 nd suppress-ra
|
ipv6 nd suppress-ra
|
||||||
|
ip nhrp holdtime 10
|
||||||
|
ip nhrp network-id 42
|
||||||
|
ip nhrp nhs dynamic nbma 192.168.1.1
|
||||||
|
ip nhrp nhs dynamic nbma 192.168.1.2
|
||||||
|
ip nhrp nhs dynamic nbma 192.168.1.3
|
||||||
|
ip nhrp registration no-unique
|
||||||
|
ip nhrp shortcut
|
||||||
|
tunnel source nhc2-eth0
|
||||||
!
|
!
|
||||||
interface nhc2-eth1
|
interface nhc2-eth1
|
||||||
ip address 10.5.5.5/24
|
ip address 10.5.5.5/24
|
@ -1,11 +0,0 @@
|
|||||||
!debug nhrp all
|
|
||||||
interface nhc2-gre0
|
|
||||||
ip nhrp holdtime 10
|
|
||||||
ip nhrp network-id 42
|
|
||||||
ip nhrp nhs dynamic nbma 192.168.1.1
|
|
||||||
ip nhrp nhs dynamic nbma 192.168.1.2
|
|
||||||
ip nhrp nhs dynamic nbma 192.168.1.3
|
|
||||||
ip nhrp registration no-unique
|
|
||||||
ip nhrp shortcut
|
|
||||||
tunnel source nhc2-eth0
|
|
||||||
exit
|
|
@ -1,12 +1,19 @@
|
|||||||
ip forwarding
|
ip forwarding
|
||||||
|
!debug nhrp all
|
||||||
interface nhs1-eth0
|
interface nhs1-eth0
|
||||||
ip address 192.168.1.1/24
|
ip address 192.168.1.1/24
|
||||||
!
|
!
|
||||||
ip route 192.168.2.0/24 192.168.1.6
|
ip route 192.168.2.0/24 192.168.1.6
|
||||||
|
nhrp nflog-group 1
|
||||||
interface nhs1-gre0
|
interface nhs1-gre0
|
||||||
ip address 172.16.1.1/32
|
ip address 172.16.1.1/32
|
||||||
no link-detect
|
no link-detect
|
||||||
ipv6 nd suppress-ra
|
ipv6 nd suppress-ra
|
||||||
|
ip nhrp holdtime 10
|
||||||
|
ip nhrp network-id 42
|
||||||
|
ip nhrp registration no-unique
|
||||||
|
ip nhrp redirect
|
||||||
|
tunnel source nhs1-eth0
|
||||||
!
|
!
|
||||||
ip route 10.4.4.0/24 172.16.1.4
|
ip route 10.4.4.0/24 172.16.1.4
|
||||||
ip route 10.5.5.0/24 172.16.1.5
|
ip route 10.5.5.0/24 172.16.1.5
|
@ -1,9 +0,0 @@
|
|||||||
!debug nhrp all
|
|
||||||
nhrp nflog-group 1
|
|
||||||
interface nhs1-gre0
|
|
||||||
ip nhrp holdtime 10
|
|
||||||
ip nhrp network-id 42
|
|
||||||
ip nhrp registration no-unique
|
|
||||||
ip nhrp redirect
|
|
||||||
tunnel source nhs1-eth0
|
|
||||||
exit
|
|
@ -1,12 +1,19 @@
|
|||||||
ip forwarding
|
ip forwarding
|
||||||
|
!debug nhrp all
|
||||||
interface nhs2-eth0
|
interface nhs2-eth0
|
||||||
ip address 192.168.1.2/24
|
ip address 192.168.1.2/24
|
||||||
!
|
!
|
||||||
ip route 192.168.2.0/24 192.168.1.6
|
ip route 192.168.2.0/24 192.168.1.6
|
||||||
|
nhrp nflog-group 1
|
||||||
interface nhs2-gre0
|
interface nhs2-gre0
|
||||||
ip address 172.16.1.2/32
|
ip address 172.16.1.2/32
|
||||||
no link-detect
|
no link-detect
|
||||||
ipv6 nd suppress-ra
|
ipv6 nd suppress-ra
|
||||||
|
ip nhrp holdtime 10
|
||||||
|
ip nhrp network-id 42
|
||||||
|
ip nhrp registration no-unique
|
||||||
|
ip nhrp redirect
|
||||||
|
tunnel source nhs2-eth0
|
||||||
!
|
!
|
||||||
ip route 10.4.4.0/24 172.16.1.4
|
ip route 10.4.4.0/24 172.16.1.4
|
||||||
ip route 10.5.5.0/24 172.16.1.5
|
ip route 10.5.5.0/24 172.16.1.5
|
@ -1,9 +0,0 @@
|
|||||||
!debug nhrp all
|
|
||||||
nhrp nflog-group 1
|
|
||||||
interface nhs2-gre0
|
|
||||||
ip nhrp holdtime 10
|
|
||||||
ip nhrp network-id 42
|
|
||||||
ip nhrp registration no-unique
|
|
||||||
ip nhrp redirect
|
|
||||||
tunnel source nhs2-eth0
|
|
||||||
exit
|
|
@ -1,12 +1,19 @@
|
|||||||
ip forwarding
|
ip forwarding
|
||||||
|
!debug nhrp all
|
||||||
interface nhs3-eth0
|
interface nhs3-eth0
|
||||||
ip address 192.168.1.3/24
|
ip address 192.168.1.3/24
|
||||||
!
|
!
|
||||||
ip route 192.168.2.0/24 192.168.1.6
|
ip route 192.168.2.0/24 192.168.1.6
|
||||||
|
nhrp nflog-group 1
|
||||||
interface nhs3-gre0
|
interface nhs3-gre0
|
||||||
ip address 172.16.1.3/32
|
ip address 172.16.1.3/32
|
||||||
no link-detect
|
no link-detect
|
||||||
ipv6 nd suppress-ra
|
ipv6 nd suppress-ra
|
||||||
|
ip nhrp holdtime 10
|
||||||
|
ip nhrp network-id 42
|
||||||
|
ip nhrp registration no-unique
|
||||||
|
ip nhrp redirect
|
||||||
|
tunnel source nhs3-eth0
|
||||||
!
|
!
|
||||||
ip route 10.4.4.0/24 172.16.1.4
|
ip route 10.4.4.0/24 172.16.1.4
|
||||||
ip route 10.5.5.0/24 172.16.1.5
|
ip route 10.5.5.0/24 172.16.1.5
|
@ -1,9 +0,0 @@
|
|||||||
!debug nhrp all
|
|
||||||
nhrp nflog-group 1
|
|
||||||
interface nhs3-gre0
|
|
||||||
ip nhrp holdtime 10
|
|
||||||
ip nhrp network-id 42
|
|
||||||
ip nhrp registration no-unique
|
|
||||||
ip nhrp redirect
|
|
||||||
tunnel source nhs3-eth0
|
|
||||||
exit
|
|
@ -29,38 +29,38 @@ test_nhrp_redundancy.py: Test NHS redundancy for NHRP
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
TOPOLOGY = """
|
TOPOLOGY = """
|
||||||
+------------+ +------------+ +------------+
|
+------------+ +------------+ +------------+
|
||||||
| | | | | |
|
| | | | | |
|
||||||
| | | | | |
|
| | | | | |
|
||||||
| NHS 1 | | NHS 2 | | NHS 3 |
|
| NHS 1 | | NHS 2 | | NHS 3 |
|
||||||
| | | | | |
|
| | | | | |
|
||||||
+-----+------+ +-----+------+ +-----+------+
|
+-----+------+ +-----+------+ +-----+------+
|
||||||
|.1 |.2 |.3
|
|.1 |.2 |.3
|
||||||
| | |
|
| | |
|
||||||
| | 192.168.1.0/24 |
|
| | 192.168.1.0/24 |
|
||||||
------+-------------------------------+------------------+-------------+------
|
------+-------------------------------+------------------+-------------+------
|
||||||
|
|
|
|
||||||
|.6
|
|.6
|
||||||
GRE P2MP between all NHS and NHC +-----+------+
|
GRE P2MP between all NHS and NHC +-----+------+
|
||||||
172.16.1.x/32 | |
|
172.16.1.x/32 | |
|
||||||
| |
|
| |
|
||||||
| Router |
|
| Router |
|
||||||
| |
|
| |
|
||||||
+-----+------+
|
+-----+------+
|
||||||
|
|
|
|
||||||
|
|
|
|
||||||
---------+----------------+-------------+------
|
---------+----------------+-------------+------
|
||||||
| 192.168.2.0/24 |
|
| 192.168.2.0/24 |
|
||||||
| |
|
| |
|
||||||
| |.4 |.5
|
| |.4 |.5
|
||||||
+------------+ | +-------+----+ +------+-----+ |
|
+------------+ | +-------+----+ +------+-----+ |
|
||||||
| | | | | | | |
|
| | | | | | | |
|
||||||
| | +--------+ | | | |
|
| | +--------+ | | | |
|
||||||
| Host |.7 | | NHC 1 | | NHC 2 +-----+10.5.5.0/24
|
| Host |.7 | | NHC 1 | | NHC 2 +-----+10.5.5.0/24
|
||||||
| +---------+ | | | | |
|
| +---------+ | | | | |
|
||||||
+------------+ | +------------+ +------------+ |
|
+------------+ | +------------+ +------------+ |
|
||||||
| |
|
| |
|
||||||
10.4.4.0/24
|
10.4.4.0/24
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Save the Current Working Directory to find configuration files.
|
# Save the Current Working Directory to find configuration files.
|
||||||
@ -148,8 +148,8 @@ def _populate_iface():
|
|||||||
def _verify_iptables():
|
def _verify_iptables():
|
||||||
tgen = get_topogen()
|
tgen = get_topogen()
|
||||||
# Verify iptables is installed. Required for shortcuts
|
# Verify iptables is installed. Required for shortcuts
|
||||||
rc, _, _ = tgen.net["nhs1"].cmd_status("iptables")
|
rc, _, _ = tgen.net["nhs1"].cmd_status("iptables -V")
|
||||||
return False if rc == 127 else True
|
return True if rc == 0 else False
|
||||||
|
|
||||||
|
|
||||||
def setup_module(mod):
|
def setup_module(mod):
|
||||||
@ -167,14 +167,8 @@ def setup_module(mod):
|
|||||||
_populate_iface()
|
_populate_iface()
|
||||||
|
|
||||||
for rname, router in router_list.items():
|
for rname, router in router_list.items():
|
||||||
router.load_config(
|
logger.info("Loading router %s" % rname)
|
||||||
TopoRouter.RD_ZEBRA,
|
router.load_frr_config(os.path.join(CWD, "{}/frr.conf".format(rname)))
|
||||||
os.path.join(CWD, "{}/zebra.conf".format(rname)),
|
|
||||||
)
|
|
||||||
if rname in ("nhs1", "nhs2", "nhs3", "nhc1", "nhc2"):
|
|
||||||
router.load_config(
|
|
||||||
TopoRouter.RD_NHRP, os.path.join(CWD, "{}/nhrpd.conf".format(rname))
|
|
||||||
)
|
|
||||||
|
|
||||||
# Initialize all routers.
|
# Initialize all routers.
|
||||||
tgen.start_router()
|
tgen.start_router()
|
||||||
|
Loading…
Reference in New Issue
Block a user