Solution

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Basic using OSPF and ACL (Solution).

The solution is marked as bold an italic.

The goal is practicing with the basic commands of OSPF and standard ACLs. You must do the next
configurations:

1. - Configure the IP addresses as:

- Host A: 10.1.1.1/24. Gateway: 10.1.1.3


IP: 10.1.1.1
Mask: 255.255.255.0
Gateway: 10.1.1.3
- Host B: 10.1.1.2/24. Gateway: 10.1.1.3
IP: 10.1.1.2
Mask: 255.255.255.0
Gateway: 10.1.1.3
- R1s G0/0: 10.1.1.3/24
Router>enable
Router#configure terminal
Router (config)#interface g0/0
Router (config-if)#ip address 10.1.1.3 255.255.255.0
Router (config-if)#no shutdown
Router (config-if)#end
- Host C: 10.3.3.3/25. Gateway: 10.3.3.1
IP: 10.3.3.3
Mask: 255.255.255.128
Gateway: 10.3.3.1
- R1s G0/1: 10.3.3.1/25
Router#configure terminal
Router (config)#interface g0/1
Router (config-if)#ip address 10.3.3.1 255.255.255.128
Router (config-if)#no shutdown
Router (config-if)#end
- S1: 10.2.2.1/24. Gateway: 10.2.2.3
IP: 10.2.2.1
Mask: 255.255.255.0
Gateway: 10.2.2.3
- S2: 10.2.2.2/24. Gateway: 10.2.2.3
IP: 10.2.2.2
Mask: 255.255.255.0
Gateway: 10.2.2.3
- R2s G0/0: 10.2.2.3/24
Router>enable
Router#configure terminal
Router (config)#interface g0/0
Router (config-if)#ip address 10.2.2.3 255.255.255.0
Router (config-if)#no shutdown
Router (config-if)#end
- R1s S0/3/0: 10.4.4.1/30
Router#configure terminal
Router (config)#interface s0/3/0
Router (config-if)#ip address 10.4.4.1 255.255.255.252
Router (config-if)#no shutdown
Router (config-if)#end

- R2s S0/3/0: 10.4.4.2/30


Router#configure terminal
Router (config)#interface s0/3/0
Router (config-if)#ip address 10.4.4.2 255.255.255.252
Router (config-if)#no shutdown
Router (config-if)#end

Check that you can ping between hosts in the same subnet:

- From Host A to Host B.


- From Host C to R1s G0/1 interface.
- From S1 to S2.
- From R1s S0/3/0 interface to R2s S0/3/0 interface.

Note that you cant ping between hosts in different subnets because the routers dont have any entry in
their routing table.

2. Enable OSPF in all interfaces both R1 and R2 (area 0) with only one subcommand in the OSPF
configuration.

R1:
Router#configure terminal
Router (config)#router ospf 1
Router (config-router)#network 10.0.0.0 0.255.255.255 area 0
Router (config-router)#end

R2:
Router#configure terminal
Router (config)#router ospf 1
Router (config-router)#network 10.0.0.0 0.255.255.255 area 0
Router (config-router)#end

Check that the neighboring relationships have been created between R1 and R2.

R1:
Router#show ip ospf neighbor
R2:
Router#show ip ospf neighbor

Check that, after configuring OSPF, you can ping between hosts in different subnets.

- From Host A to Host C.


- From Host C to S1.
- From Host A to S1.

2. Configure ACL on the right routers, interfaces and directions based on these requirements:

- Permit packets from S1 going to subnet of hosts A and B.


- Deny packets from S2 going to subnet of host A and B.
- Permit packets from S2 going to subnet of host C.
- Deny packets from S1 going to subnet of host C.

Using an outbound ACL on R1s G0/0, permit packets from S1 and deny all other packets.
Using an outbound ACL on R1s G0/1, permit packets from S2 and deny all other packets.

R1:
Router#configure terminal
Router (config)#access-list 1 permit 10.2.2.1
Router (config)#access-list 2 permit 10.2.2.2
Router (config)#interface G0/0
Router (config-if)#ip access-group 1 out
Router (config-if)#interface G0/1
Router (config-if)#ip access-group 2 out
Router (config-if)#end

After configuring ACL, check that:

- You can ping from S1 to host A and B, but not to host C.


- You can ping from S2 to host C, but not to hosts A and B.

You might also like