6. Configure the extranet for the campus network

The overall picture is:

 

The box marked part belongs to the connection with the outside world and the part of the external network

Operate on the basis of the success of "five and three-layer switch configuration server"

 1. First add a Serial port to the router

Click on the router and select the Physical tab, as follows

First turn off the router and click 1, then drag 2 to 3, and then turn on 1, two serial serial ports will be added to the router.

Each router performs the above operations

2. Configure IP for each interface

The interfaces I need to configure here are:

switch f0/3

g0/0/0 and s0/1/0 of Router 1

s0/1/0 of Router 2 

1. In the CLI command window of the switch, enter:

switch>enable

switch#configure terminal

switch(config)#interface f0/3

switch(config-if)#no switch  //switch to routing function

switch(config-if)#ip address 202.206.64.1 255.255.255.252    //Configure IP for f0/3

switch(config-if)#no shutdown    //Do not close the active port

switch(config-if)#ip routing    //Enable routing function

switch(config)#router rip    //Configure RIP protocol

switch(config-router)#version 2    //version 2

switch(config-router)#network 202.206.64.0    //Notify this network in RIP

2. In the CLI command window of the router router1, enter:

Router>enable

Router#configure terminal

Router(config)#interface g0/0/0

Router(config-if)#ip address 202.206.64.2 255.255.255.252    //Configure IP for g0/0/0

Router(config-if)#no shutdown    //Do not close the active port

Router(config-if)#exit

Router(config)#interface s0/1/0

Router(config-if)#ip address 202.206.63.2 255.255.255.252    //Configure IP for s0/1/0

Router(config-if)#no shutdown

Router(config-if)#ip routing    //Enable routing function

Router(config)#router rip    //Configure RIP protocol

Router(config-router)#version 2    //version 2

Router(config-router)#network 202.206.64.0    //Notify this network in RIP

Router(config-router)#network 202.206.63.0 

3. In the CLI command window of the router router2, enter:

Router>enable

Router#configure terminal

Router(config)#interface s0/1/0

Router(config-if)#ip address 202.206.63.1 255.255.255.252    //Configure IP for s0/1/0

Router(config-if)#no shutdown

Router(config-if)#ip routing    //Enable routing function

Router(config)#router rip    //Configure RIP protocol

Router(config-router)#version 2    //version 2

Router(config-router)#network 202.206.63.0    //Notify this network in RIP

3. Configure static routing for the two routers

out:

 From the internal network to the external network, enter in the CLI command window of Router1 (left side):

Router>enable

Router#configure terminal

Router(config)#ip route 0.0.0.0 0.0.0.0 202.206.63.1 //The external network is directly set as the default static route

Note: The format of static routing: ip route destination network netmask next hop address

Enter:

 From the external network to the internal network, enter in the CLI command window of Router2 (on the right):

Router>enable

Router#configure terminal

Router(config)#ip route 202.206.64.0 255.255.240.0 202.206.63.2  //Configure router2 with a static route into the intranet

Note: Route aggregation is performed for all networks in the intranet here:

 It can be seen that the first 20 bits are the same as 202.206.64, so the aggregated IP is 202.206.64.0/20, and the mask is 255.255.240.0

 4. Unified default static routing

Since Router1 is configured with a default static route, there is an entry s*0.0.0.0 in the routing table

 But this route is not recognized by the switch at the top layer of the intranet, so enter it in Router1:

Router(config)#router rip   //Configure RIP protocol

Router(config-router)#version 2   //version 2

Router(config-router)#default—information originate   //When there is a static default route, redistribute static cannot publish the static default route to other routers, so this command must be used at this time

At this time, there is this route in the switch at the top layer of the internal network, you can check it:

switch#show  ip route

 5. Configure the host and server of the external network

1. In the CLI command window of Router2, enter:

Router>enable

Router#configure terminal

Router(config)#interface g0/0/0

Router(config-if)#ip address 202.205.64.100 255.255.255.0    //Configure the gateway for g0/0/0

Router(config-if)#no shutdown

Router(config)#interface g0/0/1

Router(config-if)#ip address 202.204.64.100 255.255.255.100   //Configure the gateway for g0/0/0

Router(config-if)#no shutdown

Router(config-if)#ip routing    //Enable routing function

2. Configure the IP and gateway for the host PC and server on the external network:

Host IP: 202.205.64.1

Gateway: 202.205.64.100

Server IP: 202.204.64.1

Gateway: 202.204.64.100

 6. Test

Ping the host on the internal network from the host PC on the external network

Example: ping 202.206.79.1

 If it can be pinged, it is passed!

It's over!

Guess you like

Origin blog.csdn.net/m0_70295638/article/details/127652288