int config
config t
interface Serial1/0
ip address 10.1.13.1 255.255.255.0
no shut
!
interface Serial1/1
ip address 10.1.12.1 255.255.255.0
no shut
int loopback 0
ip address 10.1.0.1 255.255.255.0
ip ospf network point-to-point
exit
exit
wr
Route adv
config t
router ospf 1
log-adjacency-changes
network 10.0.0.0 0.255.255.255 area 0
!
exit
exit
wr
Int config
config t
interface Serial1/0
ip address 10.1.24.2 255.255.255.0
no shut
interface Serial1/1
ip address 10.1.23.2 255.255.255.0
no shut
interface Serial1/2
ip address 10.1.12.2 255.255.255.0
no shut
exit
exit
wr
Route adv
config t
router eigrp 100
network 10.1.23.0 0.0.0.255
network 10.1.24.0 0.0.0.255
no auto-summary
!
router ospf 1
network 10.1.12.0 0.0.0.255 area 0
!
exit
exit
wr
Int config
config t
interface Serial1/0
ip address 10.1.23.3 255.255.255.0
no shut
!
interface Serial1/1
ip address 10.1.13.3 255.255.255.0
no shut
exit
exit
wr
Route adv
config t
router eigrp 100
network 10.1.23.0 0.0.0.255
no auto-summary
!
exit
router ospf 1
network 10.1.13.0 0.0.0.255 area 0
!
exit
exit
wr
Int Config
config t
int s1/0
ip address 10.1.24.4 255.255.255.0
no shut
int loopback 0
ip address 10.4.0.1 255.255.255.0
int loopback 1
ip address 10.4.1.1 255.255.255.0
int loopback 2
ip address 10.4.2.1 255.255.255.0
int loopback 3
ip address 10.4.3.1 255.255.255.0
int loopback 4
ip address 10.4.4.1 255.255.255.0
exit
exit
wr
Adv Route
config t
router eigrp 100
network 10.0.0.0 0.255.255.255
no auto-summary
exit
exit
wr
Show ip route
Router 4
10.0.0.0/24 is subnetted, 7 subnets
C 10.4.4.0 is directly connected, Loopback4
C 10.4.2.0 is directly connected, Loopback2
C 10.4.3.0 is directly connected, Loopback3
C 10.4.0.0 is directly connected, Loopback0
C 10.4.1.0 is directly connected, Loopback1
C 10.1.24.0 is directly connected, Serial1/0
D 10.1.23.0 [90/2681856] via 10.1.24.2, 00:00:02, Serial1
router 3
10.0.0.0/24 is subnetted, 9 subnets
C 10.1.13.0 is directly connected, Serial1/1
O 10.1.12.0 [110/128] via 10.1.13.1, 00:04:00, Serial1/1
D 10.4.4.0 [90/2809856] via 10.1.23.2, 00:01:48, Serial1/0
D 10.4.2.0 [90/2809856] via 10.1.23.2, 00:01:48, Serial1/0
D 10.4.3.0 [90/2809856] via 10.1.23.2, 00:01:48, Serial1/0
D 10.4.0.0 [90/2809856] via 10.1.23.2, 00:01:48, Serial1/0
D 10.4.1.0 [90/2809856] via 10.1.23.2, 00:01:48, Serial1/0
D 10.1.24.0 [90/2681856] via 10.1.23.2, 00:04:16, Serial1/0
C 10.1.23.0 is directly connected, Serial1/0
Router 2
R2#show ip rout
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 4 subnets
O 10.1.13.0 [110/128] via 10.1.12.1, 00:30:01, Serial1/2
C 10.1.12.0 is directly connected, Serial1/2
C 10.1.24.0 is directly connected, Serial1/0
C 10.1.23.0 is directly connected, Serial1/1
Router 1
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 3 subnets
C 10.1.13.0 is directly connected, Serial1/0
C 10.1.12.0 is directly connected, Serial1/1
C 10.1.0.0 is directly connected, Loopback0
access list
config t
access-list 1 permit 10.4.0.0 0.0.0.255
access-list 1 permit 10.4.1.0 0.0.0.255
access-list 2 permit 10.4.2.0 0.0.0.255
access-list 2 permit 10.4.3.0 0.0.0.255
access-list 3 permit 10.4.4.0 0.0.0.255
show ip access list
R2#show ip access-lists
Standard IP access list 1
permit 10.4.0.0, wildcard bits 0.0.0.255 (1 match)
permit 10.4.1.0, wildcard bits 0.0.0.255 (1 match)
Standard IP access list 2
permit 10.4.2.0, wildcard bits 0.0.0.255 (1 match)
permit 10.4.3.0, wildcard bits 0.0.0.255 (1 match)
Standard IP access list 3
permit 10.4.4.0, wildcard bits 0.0.0.255 (1 match)
R2#
Route map
route-map EIGRP_TO_OSPF permit 10
match ip address 1
set metric 100
set tag 10
!
route-map EIGRP_TO_OSPF permit 20
match ip address 2
set metric 200
set tag 20
!
route-map EIGRP_TO_OSPF deny 30
match ip address 3
!
route-map EIGRP_TO_OSPF permit 40
set metric 300
set tag 30
!
show route-map
route-map EIGRP_TO_OSPF, permit, sequence 10
Match clauses:
ip address (access-lists): 1
Set clauses:
metric 100
tag 10
Policy routing matches: 0 packets, 0 bytes
route-map EIGRP_TO_OSPF, permit, sequence 20
Match clauses:
ip address (access-lists): 2
Set clauses:
metric 200
tag 20
Policy routing matches: 0 packets, 0 bytes
route-map EIGRP_TO_OSPF, deny, sequence 30
Match clauses:
ip address (access-lists): 3
Set clauses:
Policy routing matches: 0 packets, 0 bytes
route-map EIGRP_TO_OSPF, permit, sequence 40
Match clauses:
Set clauses:
metric 300
tag 30
Policy routing matches: 0 packets, 0 bytes
R2#
Redistribution
config t
router ospf 1
log-adjacency-changes
redistribute eigrp 100 subnets route-map EIGRP_TO_OSPF
network 10.1.12.0 0.0.0.255 area 0
exit
exit
wr
Show ip route on router 1
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 9 subnets
C 10.1.13.0 is directly connected, Serial1/0
C 10.1.12.0 is directly connected, Serial1/1
C 10.1.0.0 is directly connected, Loopback0
O E2 10.4.2.0 [110/200] via 10.1.12.2, 00:00:05, Serial1/1
O E2 10.4.3.0 [110/200] via 10.1.12.2, 00:00:05, Serial1/1
O E2 10.4.0.0 [110/100] via 10.1.12.2, 00:00:05, Serial1/1
O E2 10.4.1.0 [110/100] via 10.1.12.2, 00:00:05, Serial1/1
O E2 10.1.24.0 [110/300] via 10.1.12.2, 00:03:31, Serial1/1
O E2 10.1.23.0 [110/300] via 10.1.12.2, 00:03:31, Serial1/1
R1#
access list
config t
access-list 1 permit 10.4.0.0 0.0.0.255
access-list 1 permit 10.4.1.0 0.0.0.255
access-list 2 permit 10.4.2.0 0.0.0.255
access-list 2 permit 10.4.3.0 0.0.0.255
access-list 3 permit 10.4.4.0 0.0.0.255
Route map
route-map EIGRP_TO_OSPF permit 10
match ip address 1
set metric 100
set tag 10
!
route-map EIGRP_TO_OSPF permit 20
match ip address 2
set metric 200
set tag 20
!
route-map EIGRP_TO_OSPF deny 30
match ip address 3
!
route-map EIGRP_TO_OSPF permit 40
set metric 300
set tag 30
exit
exit
wr
Redistribution
config t
router ospf 1
redistribute eigrp 100 subnets route-map EIGRP_TO_OSPF
exit
Show ip route on router 1
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 9 subnets
C 10.1.13.0 is directly connected, Serial1/0
C 10.1.12.0 is directly connected, Serial1/1
C 10.1.0.0 is directly connected, Loopback0
O E2 10.4.2.0 [110/200] via 10.1.12.2, 00:06:30, Serial1/1
[110/200] via 10.1.13.3, 00:06:30, Serial1/0
O E2 10.4.3.0 [110/200] via 10.1.12.2, 00:06:30, Serial1/1
[110/200] via 10.1.13.3, 00:06:30, Serial1/0
O E2 10.4.0.0 [110/100] via 10.1.12.2, 00:06:32, Serial1/1
[110/100] via 10.1.13.3, 00:06:32, Serial1/0
O E2 10.4.1.0 [110/100] via 10.1.12.2, 00:06:32, Serial1/1
[110/100] via 10.1.13.3, 00:06:32, Serial1/0
O E2 10.1.24.0 [110/300] via 10.1.12.2, 00:06:32, Serial1/1
[110/300] via 10.1.13.3, 00:06:32, Serial1/0
O E2 10.1.23.0 [110/300] via 10.1.12.2, 00:06:33, Serial1/1
[110/300] via 10.1.13.3, 00:06:33, Serial1/0
Route map
config t
route-map OSPF_to_EIGRP permit 10
set metric 400 20 255 1 1500
set tag 40
Redistribution
router eigrp 100
redistribute ospf 1 route-map OSPF_to_EIGRP
exit
Router 4 show ip route
10.0.0.0/24 is subnetted, 10 subnets
D EX 10.1.13.0 [170/6917120] via 10.1.24.2, 00:00:10, Serial1/0
D EX 10.1.12.0 [170/6917120] via 10.1.24.2, 00:00:10, Serial1/0
C 10.4.4.0 is directly connected, Loopback4
D EX 10.1.0.0 [170/6917120] via 10.1.24.2, 00:00:10, Serial1/0
C 10.4.2.0 is directly connected, Loopback2
C 10.4.3.0 is directly connected, Loopback3
C 10.4.0.0 is directly connected, Loopback0
C 10.4.1.0 is directly connected, Loopback1
C 10.1.24.0 is directly connected, Serial1/0
D 10.1.23.0 [90/2681856] via 10.1.24.2, 00:00:11, Serial1/0
Route map
config t
route-map OSPF_to_EIGRP permit 10
set metric 400 20 255 1 1500
set tag 40
Redistribution
router eigrp 100
redistribute ospf 1 route-map OSPF_to_EIGRP
exit
Tags 10 20 30 :
Networks taged with 10 20 30 are redistributed from EIGRP to OSPF. We need to protect it from getting it back into EIGRP domain(Routemap OSPF_TO_EIGRP)
Route-map
route-map OSPF_to_EIGRP deny 5
match tag 10 20 30
show route-map
route-map OSPF_to_EIGRP, deny, sequence 5
Match clauses:
tag 10 20 30
Set clauses:
Policy routing matches: 0 packets, 0 bytes
Tag 40 :
Network tagged 40 is redistributed from OSPF to EIGRP, we need to protect it from getting it back into OSPF domain.(Routemap EIGRP_to_OSPF)
Route-map
route-map EIGRP_TO_OSPF deny 5
match tag 40
show route-map
route-map EIGRP_TO_OSPF, deny, sequence 5
Match clauses:
tag 40
Set clauses:
Policy routing matches: 0 packets, 0 bytes
How to see network tags
OSPF domain Router 1
R1#show ip route 10.4.3.0
Routing entry for 10.4.3.0/24
Known via "ospf 1", distance 110, metric 200
Tag 20, type extern 2, forward metric 64
Last update from 10.1.12.2 on Serial1/1, 00:05:04 ago
Routing Descriptor Blocks:
* 10.1.13.3, from 10.1.23.3, 00:05:04 ago, via Serial1/0
Route metric is 200, traffic share count is 1
10.1.12.2, from 10.1.24.2, 00:05:04 ago, via Serial1/1
Route metric is 200, traffic share count is 1
EIGRP domain R4
Routing entry for 10.1.13.0/24
Known via "eigrp 100", distance 170, metric 6917120
Tag 40, type external
Redistributing via eigrp 100
Last update from 10.1.24.2 on Serial1/0, 00:07:39 ago
Routing Descriptor Blocks:
* 10.1.24.2, from 10.1.24.2, 00:07:39 ago, via Serial1/0
Route metric is 6917120, traffic share count is 1
Total delay is 20200 microseconds, minimum bandwidth is 400 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
Router 2
router eigrp 100
distance eigrp 90 105
show ip route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 10 subnets
D EX 10.1.13.0 [105/6917120] via 10.1.23.3, 00:02:00, Serial1/1
C 10.1.12.0 is directly connected, Serial1/2
D 10.4.4.0 [90/2297856] via 10.1.24.4, 00:01:58, Serial1/0
D EX 10.1.0.0 [105/6917120] via 10.1.23.3, 00:02:00, Serial1/1
D 10.4.2.0 [90/2297856] via 10.1.24.4, 00:01:58, Serial1/0
D 10.4.3.0 [90/2297856] via 10.1.24.4, 00:01:58, Serial1/0
D 10.4.0.0 [90/2297856] via 10.1.24.4, 00:01:58, Serial1/0
D 10.4.1.0 [90/2297856] via 10.1.24.4, 00:01:59, Serial1/0
C 10.1.24.0 is directly connected, Serial1/0
C 10.1.23.0 is directly connected, Serial1/1