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

Detailed steps to configure the company's internal network environment

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Case 1: configuring the current network environment case 2: project phase activity

Case 1: configure the current network environment

1.1 question

A newly founded IT company with more than 80 servers in Beijing

At present, the network environment uses technology to publish the web server to Internet through port mapping technology:

Layer 3 switching: aggregation access layer switch default route: achieve simplified configuration of static routes to tens of thousands of network access to the Internet: achieve interworking NAT port mapping within the company network: achieve the release of internal Web servers

1.2 scenario

Publish the web server to Internet through port mapping technology, and the company's existing network environment topology is shown in figure-1:

Figure-1

The existing network connection description is shown in Table-1:

Table-1 Network connection description

1.3 steps

To implement this case, you need to follow these steps.

Step 1: configure the IP address for the device according to Table-1 and enable the routing function for the layer 3 switch

1) MS1 configures the IP address of the interface between vlan1 and f0ram 1 and enables the routing function

Switch (config) # hostname MS1MS1 (config) # ip routing MS1 (config) # interface vlan 1MS1 (config-if) # ip address 192.168.1.252 255.255.255.0MS1 (config-if) # no shutdown MS1 (config-if) # exitMS1 (config-if) # interface fastEthernet 0/1MS1 (config-if) # no switchportMS1 (config-if) # ip address 192.168.2.1 255.255.255.0MS1 (config-if) # no shutdown

Step 2: configure the router with an IP address and add an interface module

1) add an interface module to the router and configure the IP address on the router interface

Router (config) # hostname R1R1 (config) # interface fastEthernet 0/0R1 (config-if) # ip address 192.168.2.2 255.255.255.0R1 (config-if) # no shutdownR1 (config-if) # exitR1 (config) # interface fastEthernet 1/0R1 (config-if) # ip address 61.159.62.129 255.255.255.248R1 (config-if) # no shutdown

Step 3: configure static routes for MS1 and routers

MS1 (config-if) # ip route 0.0.0.0 0.0.0.0 192.168.2.2R1 (config) # ip route 192.168.1.0 255.255.255.0 192.168.2.1

Step 4: test the connectivity between server1 and R1 interface IP

PC > ping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Reply from 192.168.2.2: bytes=32 time=0ms TTL=254Reply from 192.168.2.2: bytes=32 time=1ms TTL=254Ping statistics for 192.168.2.2: Packets: Sent = 4, Received = 4, Lost = 0 (0 loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 1ms Average = 0msPC > ping 61.159.62.129Pinging 61.159.62.129 with 32 bytes of data:Reply from 61.159.62.129: bytes=32 time=1ms TTL=254Reply from 61.159.62.129: bytes=32 time=0ms TTL=254Reply from 61.159.62.129: bytes=32 time=2ms TTL=254Reply from 61.159.62.129: bytes=32 time=0ms TTL=254Ping statistics for 61.159.62.129: Packets: Sent = 4, Received = 4, Lost = 0 (0 loss), Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 2ms, Average = 0ms

Step 5: R1 configure Port Mapping

R1 (config) # ip nat inside source static tcp 192.168.1.8 80 61.159.62.131 80 R1 (config) # interface fastEthernet 0/0R1 (config-if) # ip nat insideR1 (config) # interface f1/0R1 (config-if) # ip nat outside

Step 6: view the mapping result on PC7, as shown in figure-2

Figure-2

2 case 2: project phase exercise

2.1 question

Analysis of existing network problems:

The access layer switch is only connected to the same layer 3 switch, and there is a single point of failure that affects the network communication. Internet connection to a single service provider

Existing network requirements:

With the development of enterprises, in order to ensure the high availability of the network, a lot of redundancy technologies need to be used. To ensure that the local area network will not cause network failure due to line failure. Ensure that the client machine does not have a single point of failure due to the use of a single gateway. Ensure highly available access to the Internet using redundant Internet connections. Increase the network link bandwidth.

2.2 scenario

Based on the requirements of the project, the following technologies are required:

STP: solving broadcast Storm and Link redundancy caused by layer 2 Loop Ethernet Channel: improving Network Link bandwidth RIP routing Protocol: realizing automatic Learning of Network paths HSRP: achieving Gateway redundancy

The replanned network topology is shown in figure-3:

Figure-3

The replanned network connection description is shown in tables-2 and-3:

Table-2 Network connection description

Table-3 description of network connection (continued)

2.3 steps

To implement this case, you need to follow these steps.

Step 1: static routes upgrade dynamic routes.

1) R1 removes static routes and configures rip

R1 (config) # no ip route 192.168.1.0 255.255.255.0 192.168.2.1R1 (config) # router rip R1 (config-router) # version 2R1 (config-router) # no auto-summary R1 (config-router) # network 192.168.2.0R1 (config-router) # default-information originate

2) remove static routes and configure rip on MS1

MS1 (config) # no ip route 0.0.0.0 0.0.0.0 192.168.2.2MS1 (config) # router rip MS1 (config-router) # version 2MS1 (config-router) # no auto-summary MS1 (config-router) # network 192.168.1.0MS1 (config-router) # network 192.168.2.0

3) View the routing table on MS1

MS1#show ip route Codes: C-connected, S-static, I-IGRP, R-RIP, M-mobile, B-BGPD-EIGRP, EX-EIGRP external, O-OSPF, IA-OSPF inter areaN1-OSPF NSSA external type 1, N2-OSPF NSSA external type 2E1-OSPF external type 1, E2-OSPF external type 2, E-EGPi-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-ODRP-periodic downloaded static routeGateway of last resort is 192.168.2.2 to network 0.0.0.0C 192.168.1.0 is directly connected 24 is directly connected, Vlan1C 192.168.2.0 via 24 is directly connected, FastEthernet0/1R* 0.0.0.0 via 192.168.2.2, 00:00:01, FastEthernet0/1

Step 2: configure the interface of SW1, SW2, SW3, SW4 and MS1 to Trunk mode and do Ethernet channel.

1) trunk and Ethernet channel between SW1, SW2, SW3, SW4 and MS1.

Switch (config) # hostname SW1SW1 (config) # interface range fastEthernet 0amp 5-6SW1 (config-if-range) # switchport mode trunk SW1 (config-if-range) # channel-group 1 mode onSwitch (config) # hostname SW2SW2 (config) # interface range fastEthernet 0Unip 7-8SW2 (config-if-range) # switchport mode trunk SW2 (config-if-range) # channel-group 2 mode onSwitch (config) # hostname SW3SW3 (config) # interface range fastEthernet 0R9-10SW3 (config-if-range) # switchport mode trunk SW3 (config-if-range) # channel-group 3 mode on Switch (config) # hostname SW4SW4 (config) # interface range fastEthernet 0 switchport mode trunk SW4 11-12SW4 (config-if-range) # switchport mode trunk SW4 (config-if-range) # channel-group 4 mode on

2) do Ethernet channel between MS1 and SW1, SW2, SW3, SW4 and enable trunk

MS1 (config) # interface range fastEthernet 0amp 5-6

MS1 (config-if-range) # switchport trunk encapsulation dot1q

MS1 (config-if-range) # switchport mode trunk

MS1 (config-if-range) # channel-group 1 mode on

MS1 (config-if-range) # exit

MS1 (config-if-range) # interface range fastEthernet 0amp 7-8

MS1 (config-if-range) # switchport trunk encapsulation dot1q

MS1 (config-if-range) # channel-group 2 mode on

MS1 (config-if-range) # switchport mode trunk

MS1 (config-if-range) # exit

MS1 (config-if-range) # interface range fastEthernet 0amp 9-10

MS1 (config-if-range) # switchport trunk encapsulation dot1q

MS1 (config-if-range) # switchport mode trunk

MS1 (config-if-range) # channel-group 3 mode on

MS1 (config-if-range) # exit

MS1 (config-if-range) # interface range fastEthernet 0amp 11-12

MS1 (config-if-range) # switchport trunk encapsulation dot1q

MS1 (config-if-range) # switchport mode trunk on

MS1 (config-if-range) # channel-group 4 mode on

Step 3: add MS2 and configure Ethernet channels with MS1, SW1, SW2, SW3, and SW4.

1) configure Ethernet channel with MS2 on MS1

MS1 (config) # interface range fastEthernet 0amp 13-15MS1 (config-if-range) # channel-group 5 mode onMS1 (config-if-range) # switchport trunk encapsulation dot1q MS1 (config-if-range) # switchport mode trunk

2) configure the Ethernet channel between MS2 and MS1, SW1, SW2, SW3, SW4

MS2 (config) # interface range fastEthernet 0amp 10-12MS2 (config-if-range) # channel-group 5 mode onMS2 (config-if-range) # switchport trunk encapsulation dot1q MS2 (config-if-range) # switchport mode trunk MS2 (config-if-range) # exitMS2 (config) # interface range fastEthernet 0amp 2-3MS2 (config-if-range) # channel-group 1 mode onMS2 (config-if-range) # switchport trunk encapsulation dot1q MS2 (config-if-range) # switchport mode trunk MS2 (config-if-range) # ExitMS2 (config) # interface range fastEthernet 0amp 4-5MS2 (config-if-range) # channel-group 2 mode onMS2 (config-if-range) # switchport mode trunk MS2 (config-if-range) # exitMS2 (config) # interface range fastEthernet 0There 6-7MS2 (config-if-range) # channel-group 3 mode onMS2 (config-if-range) # switchport trunk encapsulation dot1q MS2 (config-if-range) # switchport mode trunk MS2 (config-if-range) # exitMS2 (config) # interface range fastEthernet 0B8-9MS2 (config-if-range) # channel-group 4 mode onMS2 (config-if-range) # switchport trunk encapsulation dot1q MS2 (config-if-range) # switchport mode trunk

3) View the Ethernet channel on MS1

MS1 > show etherchannel port-channel Channel-group listing:--Group: 1-Port-channels in the group:--Port-channel: Po1-Age of the Port-channel = 00d:00h:05m:21sLogical slot/port = 2max 1 Number of ports = 2GC = 0x00000000 HotStandBy port = nullPort state = Port-channel Protocol = PAGPPort Security = DisabledPorts in the Port-channel:Index Load Port EC state No of bits-+-0 00 Fa0/5 On 0000 Fa0/6 On 0Time since last port bundled: 00d:00h:05m:21s Fa0/6Group: 2- -Port-channels in the group:--Port-channel: Po2-Age of the Port-channel = 00d:00h:05m:21sLogical slot/port = 2 Number of ports = 2GC = 0x00000000 HotStandBy port = nullPort state = Port-channel Protocol = PAGPPort Security = DisabledPorts in the Port-channel:Index Load Port EC state No of bits-+- -+-0 00 Fa0/7 On 00 00 Fa0/8 On 0Time since last port bundled: 00d:00h:05m:21s Fa0/8Group: 3-Port-channels in the group:--Port-channel : Po3-Age of the Port-channel = 00d:00h:05m:21sLogical slot/port = 2max 3 Number of ports = 2GC = 0x00000000 HotStandBy port = nullPort state = Port-channel Protocol = PAGPPort Security = DisabledPorts in the Port-channel:Index Load Port EC state No of bits-+- -0 00 Fa0/9 On 00 00 Fa0/10 On 0Time since last port bundled: 00d:00h:05m:21s Fa0/10Group: 4-Port-channels in the group:--Port-channel: Po4-Age of the Port-channel = 00d:00h:05m:21sLogical slot/port = 2 Number of ports 4 Number of ports = 2GC = 0x00000000 HotStandBy port = nullPort state = Port-channel Protocol = PAGPPort Security = DisabledPorts in the Port-channel:Index Load Port EC state No of bits-+-0 00 Fa0/11 On 0000 Fa0/12 On 0Time since last port bundled: 00d:00h:05m:21s Fa0/12Group: 5- -Port-channels in the group:--Port-channel: Po5-Age of the Port-channel = 00d:00h:08m:11sLogical slot/port = 2max 5 Number of ports = 3GC = 0x00000000 HotStandBy port = nullPort state = Port-channel Protocol = PAGPPort Security = DisabledPorts in the Port-channel:Index Load Port EC state No of bits-+ -- +-0 00 Fa0/13 On 00 00 Fa0/14 On 00 Fa0/15 On 0Time since last port bundled: 00d:00h:08m:11s Fa0/15

Step 4: configure STP with MS1 and MS2

1) configure stp on MS1 and MS2

MS1 (config) # spanning-tree vlan 1 root primary MS2 (config) # spanning-tree vlan 1 root secondary

2) View stp on MS1 and MS2

MS1# show spanning-tree vlan 1VLAN0001Spanning tree enabled protocol ieeeRoot ID Priority 24577Address 0004.9A70.6B06This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 24577 (priority 24576 sys-id-ext 1) Address 0004.9A70.6B06Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 20Interface Role Sts Cost Prio.Nbr Type-- Po1 Desg FWD 9 128.27 ShrPo2 Desg FWD 9 128.28 ShrPo3 Desg FWD 9 128.29 ShrPo4 Desg FWD 9 128.30 ShrPo5 Desg FWD 8 128.31 ShrMS2#show spanning-tree vlan 1 VLAN0001Spanning tree enabled protocol ieeeRoot ID Priority 24577Address 0004.9A70.6B06Cost 8Port 31 (Port-channel 5) Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 28673 (priority 28672 sys-id-ext 1) Address 0006.2A05.A2BAHello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 20Interface Role Sts Cost Prio.Nbr Type--Po1 Desg FWD 9 128.27 ShrPo2 Desg FWD 9 128.28 ShrPo3 Desg FWD 9 128.29 ShrPo4 Desg FWD 9 128.30 ShrPo5 Root FWD 8 128.31 Shr

Step 5: HSRP configuration

1) MS1 configuration HSRP

MS1 (config) # interface vlan 1MS1 (config-if) # standby 1 ip 192.168.1.254MS1 (config-if) # standby 1 priority 200MS1 (config-if) # standby 1 preempt

2) MS2 configure HSRP to enable routing function

MS2 (config) # ip routingMS2 (config) # interface vlan 1MS2 (config) # ip address 192.168.1.253 255.255.255.0MS2 (config) # no shutdownMS2 (config-if) # standby 1 ip 192.168.1.254 MS2 (config-if) # standby 1 priority 195MS2 (config-if) # standby 1 preempt

3) configure port tracking for HSRP of MS1 switch, turn off tracking interface, and view HSRP status on MS1 and MS2

MS1 (config) # MS1 (config) # interface vlan 1MS1 (config-if) # standby 1 track fastEthernet 0/1MS1 (config-if) # exitMS1 (config) # interface fastEthernet 0/1MS1 (config-if) # shutdownMS1#show standby brief P indicates configured to preempt. | Interface Grp Pri P State Active Standby Virtual IPVl1 1 190 P Standby 192.168.1.253 local 192.168.1.254MS2#show standby brief P indicates configured to preempt.Interface Grp Pri P State Active Standby Virtual IPVl1 1 195 P Active local 192.168.1.252 192.168.1.254

Step 6: MS2 connects to R1 and configures rip

1) configure the interface of R1 connected to MS2 with IP address and configure rip

R1 (config) # interface fastEthernet 0/24R1 (config-if) # ip address 192.168.3.2 255.255.255.0R1 (config-if) # exitR1 (config) # router rip R1 (config-router) # version 2R1 (config-router) # network 192.168.3.0MS2 (config-if) # exitMS2 (config) # router rip MS2 (config-router) # version 2MS2 (config-router) # no auto-summary MS2 (config-router) # network 192.168.1.0

Step 7: add router R2, configure a default route for R2, connect R2 to MS1, MS2, Internet, and configure IP and dynamic routing

1) configure the IP address, rip, default route of R2.

Router (config) hostname R2R2 (config) # interface fastEthernet 0/0R2 (config-if) # ip address 192.168.4.2 255.255.255.0R2 (config-if) # no shutdownR2 (config-if) # exitR2 (config) # interface fastEthernet 0/1R2 (config-if) # ip address 192.168.5.2 255.255.255.0R2 (config-if) # no shutdownR2 (config-if) # exitR2 (config) # interface fastEthernet 1/0R2 (config-if) # ip address 61.159.62 .130 255.255.255.248R2 (config-if) # no shutdownR2 (config-if) # exitR2 (config) ip route 0.0.0.0 0.0.0.0 fastEthernet 1/0R2 (config) # router ripR2 (config-router) # version 2R2 (config-router) # no auto-summary R2 (config-router) # network 192.168.4.0R2 (config-router) # network 192.168.5.0R2 (config-router) # default-information originate

2) MS2 configure IP address to add dynamic routing entry

MS2 (config) # interface fastEthernet 0/1MS2 (config-if) # no switchportMS2 (config-if) # ip address 192.168.4.1 255.255.255.0MS2 (config-if) # no shutdownMS2 (config-if) # exitMS2 (config) # router ripR2 (config-router) # version 2MS2 (config-router) # network 192.168.4.0

3) MS1 configure IP address to add dynamic routing entry

MS1 (config) # interface fastEthernet 0/24MS1 (config-if) # no switchportMS1 (config-if) # ip address 192.168.5.1 255.255.255.0MS1 (config-if) # no shutdownMS1 (config-if) # exitMS1 (config) # router ripR2 (config-router) # version 2MS1 (config-router) # network 192.168.5.0

4) Test the connectivity of the network on the client side

SERVER > ipconfig FastEthernet0 Connection: (default port) Link-local IPv6 Address.: FE80::201:96FF:FEA8:404BIP Address..: 192.168.1.1Subnet Mask.: 255.255.255.0Default Gateway.: 192.168.1.254SERVER > ping 192.168.2.1Pinging 192.168.2.1 with 32 bytes of data:Reply from 192.168.2.1: bytes=32 time=0ms TTL=255Reply from 192.168.2.1: bytes=32 time=0ms TTL=255Ping statistics for 192.168.2.1:Packets: Sent = 4 Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 0ms, Average = 0msSERVER > ping 192.168.3.1Pinging 192.168.3.1 with 32 bytes of data:Reply from 192.168.3.1: bytes=32 time=0ms TTL=255Reply from 192.168.3.1: bytes=32 time=0ms TTL=255Ping statistics for 192.168.3.1:Packets: Sent = 4, Received = 2, Lost = 2 (50% loss) Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 0ms, Average = 0msSERVER > ping 192.168.4.1Pinging 192.168.4.1 with 32 bytes of data:Reply from 192.168.4.1: bytes=32 time=1ms TTL=255Reply from 192.168.4.1: bytes=32 time=0ms TTL=255Ping statistics for 192.168.4.1:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 0ms Maximum = 1ms, Average = 0msSERVER > ping 192.168.5.1Pinging 192.168.5.1 with 32 bytes of data:Reply from 192.168.5.1: bytes=32 time=1ms TTL=255Reply from 192.168.5.1: bytes=32 time=0ms TTL=255Ping statistics for 192.168.5.1:Packets: Sent = 4, Received = 4, Lost = 0 (0 loss), Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 1ms Average = 0msSERVER > ping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Reply from 192.168.2.2: bytes=32 time=1ms TTL=254Reply from 192.168.2.2: bytes=32 time=1ms TTL=254Reply from 192.168.2.2: bytes=32 time=11ms TTL=254Reply from 192.168.2.2: bytes=32 time=0ms TTL=254Ping statistics for 192.168.2.2:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 11ms Average = 3msSERVER > ping 192.168.3.2Pinging 192.168.3.2 with 32 bytes of data:Reply from 192.168.3.2: bytes=32 time=0ms TTL=254Reply from 192.168.3.2: bytes=32 time=0ms TTL=254Reply from 192.168.3.2: bytes=32 time=1ms TTL=254Reply from 192.168.3.2: bytes=32 time=0ms TTL=254Ping statistics for 192.168.3.2:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 1ms, Average = 0ms

5) close MS1

MS1 (config) # interface range fastEthernet 0amp 1-24MS1 (config-if-range) # shutdown

6) Test whether the web server can be accessed on the public network, as shown in figure-4

Figure-4

Step 8: configure port mapping on R2

1) configure port mapping on R2 to specify NAT import

R2 (config) # ip nat inside source static tcp 192.168.1.8 80 61.159.62.131 80R2 (config) # interface fastEthernet 0/0R2 (config-if) # ip nat inside R2 (config-if) # exitR2 (config) # interface fastEthernet 0/1R2 (config-if) # ip nat inside R2 (config-if) # exitR2 (config) # interface fastEthernet 1/0R2 (config-if) # ip nat outside

2) shut down R1 (shown in figure-5) to test whether the public network can access the web server properly (because the simulator has BUG, you need to add an Internet host IP:61.159.62.133 test as shown in figure-6)

Figure-5

Figure-6

You can access the web server to prove that the project upgrade is successful.

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

Servers

Wechat

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

12
Report