Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Experiment of using routing Protocol in layer 3 switch of Cisco Packet Tracer

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Experimental environment:

Purpose of the experiment: (VLAN interworking between two companies)

1. Configure the layer 3 switch in Company B and set FA0/1 FA0/2 FA0/3 as the TRUNK port.

2. In the layer 3 switch of Company B, create VTP, and create VLAN20 VLAN30 VLAN40 VLAN100, and set the corresponding IP address.

3. In the layer 3 switch of Company B, create the IP address pool of each VLAN.

4. In the layer 2 switch of B company, set up VTP CLIENT.

5. In Company B, add each PC to the corresponding VLAN port according to the figure, and see if you can get the IP address.

6. Enable the routing function IP ROUTING in the layer 3 switch of Company B, and test whether the network segments within the company are interconnected.

Note: the operation of Company An above is omitted.

7. Turn off the switching function on the dedicated line ports of the two companies, and set the corresponding IP address.

8. First test whether the VLAN between the two companies can communicate with each other.

9. Because each VLAN is not directly connected, it is necessary to add the corresponding routing protocol to each company's layer 3 switch.

10. Test whether the PC between the two network segments can be interconnected.

The steps of the experiment:

1. Configure the layer 3 switch in Company B and set FA0/1 FA0/2 FA0/3 as the TRUNK port.

CoreSWB (config) # int fa0/1

CoreSWB (config-if) # switchport trunk encapsulation dot1q

CoreSWB (config-if) # switchport mode trunk

CoreSWB (config) # int fa0/2

CoreSWB (config-if) # switchport trunk encapsulation dot1q

CoreSWB (config-if) # switchport mode trunk

CoreSWB (config) # int fa0/3

CoreSWB (config-if) # switchport trunk encapsulation dot1q

CoreSWB (config-if) # switchport mode trunk

2. In the layer 3 switch of Company B, create VTP, and create VLAN20 VLAN30 VLAN40 VLAN100, and set the corresponding IP address.

CoreSWB (vlan) # vtp domain senya

Changing VTP domain name from NULL to senya

CoreSWB (vlan) # vtp server

Device mode already VTP SERVER.

CoreSWB#conf t

Enter configuration commands, one per line. End with CNTL/Z.

CoreSWB (config) # vlan 20

CoreSWB (config-vlan) # exit

CoreSWB (config) # vlan 30

CoreSWB (config-vlan) # exit

CoreSWB (config) # vlan 40

CoreSWB (config-vlan) # exit

CoreSWB (config) # vlan 100

CoreSWB (config-vlan) # exit

CoreSWB (config) # int vlan20

CoreSWB (config-if) # ip add 192.168.20.1 255.255.255.0

CoreSWB (config-if) # exit

CoreSWB (config) # int vlan30

CoreSWB (config-if) # ip add 192.168.30.1 255.255.255.0

CoreSWB (config-if) # exit

CoreSWB (config) # int vlan40

CoreSWB (config-if) #

% LINK-5-CHANGED: Interface Vlan40, changed state to up

% LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up

CoreSWB (config-if) # ip add 192.168.40.1 255.255.255.0

CoreSWB (config-if) # exit

CoreSWB (config-if) # exit

3. In the layer 3 switch of Company B, create the IP address pool of each VLAN.

CoreSWB (config) # ip dhcp pool vlan20

CoreSWB (dhcp-config) # network 192.168.20.0 255.255.255.0

CoreSWB (dhcp-config) # default-router 192.168.20.1

CoreSWB (dhcp-config) # exit

CoreSWB (config) # ip dhcp pool vlan30

CoreSWB (dhcp-config) # network 192.168.30.0 255.255.255.0

CoreSWB (dhcp-config) # default-router 192.168.30.1

CoreSWB (dhcp-config) # exit

CoreSWB (config) # ip dhcp pool vlan40

CoreSWB (dhcp-config) # network 192.168.40.0 255.255.255.0

CoreSWB (dhcp-config) # default-router 192.168.40.1

CoreSWB (dhcp-config) # exit

4. In the layer 2 switch of B company, set up VTP CLIENT. (show the operation steps of only one switch)

Switch#vlan database

% Warning: It is recommended to configure VLAN from config mode

As VLAN database mode is being deprecated. Please consult user

Documentation for configuring VTP/VLAN in config mode.

Switch (vlan) # vtp domain senya

Domain name already set to senya.

Switch (vlan) # vtp client

Setting device to VTP CLIENT mode.

Switch (vlan) # exit

APPLY completed.

Switch#show vlan

VLAN Name Status Ports

1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/5

Fa0/6, Fa0/7, Fa0/8, Fa0/9

Fa0/10, Fa0/11, Fa0/12, Fa0/13

Fa0/14, Fa0/15, Fa0/16, Fa0/17

Fa0/18, Fa0/19, Fa0/20, Fa0/21

Fa0/22, Fa0/23, Fa0/24

20 VLAN0020 active

30 VLAN0030 active

40 VLAN0040 active

100 VLAN0100 active

1002 fddi-default act/unsup

1003 token-ring-default act/unsup

1004 fddinet-default act/unsup

1005 trnet-default act/unsup

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2

1 enet 100001 1500-00

20 enet 100020 1500-00

5. In Company B, add each PC to the corresponding VLAN port according to the figure, and see if you can get the IP address. (other switch operations are omitted)

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch (config) # int fa0/2

Switch (config-if) # switchport mode access

Switch (config-if) # switchport access vlan 20

6. Enable the routing function IP ROUTING in the layer 3 switch of Company B, and test whether the network segments within the company are interconnected.

In the absence of IP ROUTING, the following:

After enabling IP ROUTING on the layer 3 switch, it is as follows:

7. Turn off the switching function on the dedicated line ports of the two companies, set the corresponding IP address and test whether PING can be reached.

Company A:

CoreSW (config) # int fa0/4

CoreSW (config-if) # no switchport

CoreSW (config-if) # ip add 192.168.100.1 255.255.255.0

Company B:

CoreSWB (config) # int fa0/5

CoreSWB (config-if) # no switchport

CoreSWB (config-if) # ip add 192.168.100.2 255.255.255.0

The two companies communicate with each other:

CoreSW#PING 192.168.100.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.100.2, timeout is 2 seconds:

!

Success rate is 100 percent (5amp 5), round-trip min/avg/max = 0 pound 0 ms

8. First test whether the VLAN between the two companies can communicate with each other.

CoreSW#show ip route

Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGP

D-EIGRP, EX-EIGRP external, O-OSPF, IA-OSPF inter area

N1-OSPF NSSA external type 1, N2-OSPF NSSA external type 2

E1-OSPF external type 1, E2-OSPF external type 2, E-EGP

I-IS-IS, L1-IS-IS level-1, L2-IS-IS level-2, ia-IS-IS inter area

*-candidate default, U-per-user static route, o-ODR

P-periodic downloaded static route

Gateway of last resort is not set

C 192.168.2.0/24 is directly connected, Vlan2

C 192.168.3.0/24 is directly connected, Vlan3

C 192.168.4.0/24 is directly connected, Vlan4

C 192.168.100.0/24 is directly connected, FastEthernet0/4

9. Because each VLAN is not directly connected, it is necessary to add the corresponding routing protocol to each company's layer 3 switch.

Company An adds the VLAN segment information of Company B as follows:

CoreSW#conf t

Enter configuration commands, one per line. End with CNTL/Z.

CoreSW (config) # router rip

CoreSW (config-router) # ver 2

CoreSW (config-router) # no au

CoreSW (config-router) # net 192.168.2.0

CoreSW (config-router) # net 192.168.3.0

CoreSW (config-router) # net 192.168.4.0

CoreSW (config-router) # net 192.168.100.0

Company B adds the VLAN segment information of Company An as follows:

CoreSWB#conf t

Enter configuration commands, one per line. End with CNTL/Z.

CoreSWB (config) # router rip

CoreSWB (config-router) # ver 2

CoreSWB (config-router) # no au

CoreSWB (config-router) # net 192.168.20.0

CoreSWB (config-router) # net 192.168.30.0

CoreSWB (config-router) # net 192.168.40.0

CoreSWB (config-router) # net 192.168.100.0

The RIP protocol announces the VLAN of its own network segment to other switches.

The routing table of company A's layer 3 switch:

CoreSW#show ip route

Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGP

D-EIGRP, EX-EIGRP external, O-OSPF, IA-OSPF inter area

N1-OSPF NSSA external type 1, N2-OSPF NSSA external type 2

E1-OSPF external type 1, E2-OSPF external type 2, E-EGP

I-IS-IS, L1-IS-IS level-1, L2-IS-IS level-2, ia-IS-IS inter area

*-candidate default, U-per-user static route, o-ODR

P-periodic downloaded static route

Gateway of last resort is not set

C 192.168.2.0/24 is directly connected, Vlan2

C 192.168.3.0/24 is directly connected, Vlan3

C 192.168.4.0/24 is directly connected, Vlan4

R 192.168.20.0/24 [120/1] via 192.168.100.2, 00:00:25, FastEthernet0/4

R 192.168.30.0/24 [120/1] via 192.168.100.2, 00:00:25, FastEthernet0/4

R 192.168.40.0/24 [120/1] via 192.168.100.2, 00:00:25, FastEthernet0/4

C 192.168.100.0/24 is directly connected, FastEthernet0/4

The routing table of Company B is as follows:

CoreSWB#

CoreSWB#show ip route

Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGP

D-EIGRP, EX-EIGRP external, O-OSPF, IA-OSPF inter area

N1-OSPF NSSA external type 1, N2-OSPF NSSA external type 2

E1-OSPF external type 1, E2-OSPF external type 2, E-EGP

I-IS-IS, L1-IS-IS level-1, L2-IS-IS level-2, ia-IS-IS inter area

*-candidate default, U-per-user static route, o-ODR

P-periodic downloaded static route

Gateway of last resort is not set

R 192.168.2.0/24 [120/1] via 192.168.100.1, 00:00:10, FastEthernet0/4

R 192.168.3.0/24 [120/1] via 192.168.100.1, 00:00:10, FastEthernet0/4

R 192.168.4.0/24 [120/1] via 192.168.100.1, 00:00:10, FastEthernet0/4

C 192.168.20.0/24 is directly connected, Vlan20

C 192.168.30.0/24 is directly connected, Vlan30

C 192.168.40.0/24 is directly connected, Vlan40

C 192.168.100.0/24 is directly connected, FastEthernet0/4

10. Test whether the PC between the two network segments can be interconnected.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report