Reading: 5191
Children's shoes want to learn to build a network environment, but there is no network equipment to practice, or in the test scenario, it needs to involve a complex network environment, but there is no network equipment to test in the computer room, what should we do? It doesn't matter, GNS3 can help you solve these problems!!!
GNS3 is a kind of graphical network simulator that can simulate complex network. On GNS3, network devices can be connected with network cable as in real environment, and network configuration can be carried out on network devices, so that network devices can be connected with external network.
The following screenshot shows the interface of GNS3:
Now we are going to build the following network environment. The network topology is as follows:
First, import Cisco router IOS image
GNS3 only supports Cisco devices. If you want to add a type of Cisco device, you can download the corresponding IOS image file online. The download link is: http://www.2cisco.com/soft/index.html.
The following describes how to import Cisco router IOS image on GNS3. Import Cisco router IOS file.
Step 1 on the GNS3 interface, click.
Step 2 in the expanded router tab, click "new appliance template".
Step 3 select "add an IOS router using a real IOS image (supported by dynamics)" and click OK.
Step 4 select "new image", import IOS image file of router, and click next.
Step 5 modify the name and click next.
Step 6 set the memory size of the c7200 router and click next.
Step 7 select the slot module of c7200 router and click Next (PS: multiple slots are optional).
Step 8 click idle PC finder to calculate the CPU threshold of c7200 router.
Step 9 click OK.
Step 10 click finish.
Step 11 click OK. (PS: if you want to add router, click new. If you want to modify the added router, click Edit. If you want to delete the added router, click delete.)
Step 12: enter the GNS3 interface.
2. Add device
Step 1 opens the GNS3 interface.
Step 2 click, in the expanded router list, select router c7200, drag it to the blank space on the right, drag twice to add two routers. By default, the system names the routers R1 and R2.
Step 3 Click. In the expanded terminal device, select host and drag it to the blank space on the right to indicate that 1 host has been added. By default, the host is named host1.
3. Modify device name
Step 1 right click the router and click Configure in the expanded list.
Step 2 modify the name of the router, change R1 to c7200-v5, and click OK. Similarly, change R2 to c7200-v9.
Step 3 modify the host name, change host1 to gns3-10.67.8.50, and click OK.
4. Configure the network between router and host
Step 1 start the router device, and see that the devices in the topology summary on the right are all green, indicating that the devices are running.
Step 2 click, then click c7200-v5 router, select an interface in the expanded router interface, such as FastEthernet 0 / 0, then click c7200-v9 router, select an interface FastEthernet 0 / 0 in the expanded router interface, so as to connect a network cable between c7200-v5 and c7200-v9.
Step 3 Click, and then click c7200-v5 router. In the expanded router interface, select another unused interface, such as FastEthernet 0 / 1, and then click gns3-10.67.8.50. In the expanded network interface, select an unused network interface, such as nio_gen_eth: local connection 3, so that a network cable is connected between c7200-v5 and gns3-10.67.8.50.
Step 4 open the console of the two routers for network configuration. After configuration, other machines in the local area network, such as the working machine or the testing machine, can access c7200-v5, but not c7200-v9.
C7200-v5#config ter
C7200-v5(config)#int f 0/0
C7200-v5(config-if)#ip add 10.10.10.10 255.255.0.0
C7200-v5(config-if)#no shutdown
C7200-v5(config-if)#ip route 0.0.0.0 0.0.0.0 10.10.10.20
C7200-v5(config)#end
C7200-v5#write
To configure the network of interface FastEthernet 0 / 1:
C7200-v5#config ter
C7200-v5(config)#int f 0/1
C7200-v5(config-if)#ip add 10.67.8.52 255.255.0.0
C7200-v5(config-if)#no shutdown
C7200-v5(config-if)#ip route 0.0.0.0 0.0.0.0 10.67.255.254
C7200-v5(config)#end
C7200-v5#write
C7200-v9#config ter
C7200-v9(config)#int f 0/0
C7200-v9(config-if)#ip add 10.10.10.20 255.255.0.0
C7200-v9(config-if)#no shutdown
C7200-v9(config-if)#ip route 0.0.0.0 0.0.0.0 10.10.10.10
C7200-v9(config)#end
C7200-v9#write
Step 5 add a route to the machine that needs to access c7200-v9 to enable it to access c7200-v9.
How to add a route on a Linux system:
Temporary add route: route add - net 0.0.0.0 netmask 0.0.0.0 GW 10.67.8.52
How to add a route on a Windows system:
Temporary add route: route add 0.0.0.0 mask 0.0.0.0 10.67.8.52
Permanently add route: Route - P add 0.0.0.0 mask 0.0.0.0 10.67.8.52
5. Configure telnet function of router
If you want to access the router remotely through SecureCRT or putty, you can configure the router as follows:
C7200-v5 (config) ාenable secret nsf0cus. / set the login password in privileged mode, such as nsf0cus
C7200-v5(config)#line vty 0 4
C7200-v5(config-line)#password nsf0cus.
C7200-v5(config-line)#end
C7200-v5#write
C7200-v5#
FAQ
1. The router directly connected to the host cannot Ping each other. What should I do?
[problem] the host gns3-10.67.8.50 is not connected to the router c7200-v5
[solution] enter the device manager, right-click the network card in the network adapter, click properties, and the following three properties are disabled in the advanced level, respectively:
IPv4 checksum offload
TCP checksum offload (IPv4)
UDP checksum offload (IPv4)
After saving, restart the system.
2. The network between the router and the host is interconnected, but the router cannot Ping other machines in the LAN
[problem] the host gns3-10.67.8.50 can communicate with the router c7200-v5 network, but c7200-v5 is not connected with other machine networks in the local area network, such as unable to Ping the test server 10.67.1.249.
[reason] if GNS3 is installed on the physical machine, there will be no such problem. Only when GNS3 is installed on the virtual machine, it will appear. Because GNS3 will use packet grabbing tools, it needs to turn on hybrid mode, which is off by default on the host of ESX.
[solution]
On the host where the virtual machine is located, change the hybrid mode of the virtual switch to accept.
If you need to know more, you can join QQ group: 570982169 direct inquiry: 010-68438880