Ushered in a month of primary school
Sophomores had a bit of a mess
But the sun still rises
Keep struggling
- IP address planning, static routing and DHCP configuration
- Network switching technology
- Address exchange and access control technology
- Network routing technology
- GRE over IPSec (VPN + security)
- Comprehensive networking experiment
- Course examination + generic cabling experiment
Related concepts
ICANN is responsible for global IP address allocation
Preparation method of IP address
Three commonly used categories of IP addresses
One class A address is equivalent to 256 class B addresses, and one class B address is equivalent to 256 class C addresses
Terminal requiring IP address
Network devices requiring IP addresses:
Router LAN interface
Router WAN interface
Network devices requiring IP address management:
Switch
Wireless access point
The available host numbers for each address block are: 2 n ā 2 2^n-2 2nā2
- One network = host + switch + router access point (Gateway)
- The intermediate route is also a network
- The network numbers of the same network are the same, and the network numbers of different networks are different
Sign in
https://202.119.23.198:8021/
User name: student
password: DNseu@123
172.16.20.208
User name: student number
Password: student number @ 2021
Select configuration: Html5
System use
command | function |
---|---|
? | View command, space page |
exit | Exit current layer |
R1>enable | Enter privileged mode |
R1#disable | Exit privileged mode |
R1#configure terminal | Enter global configuration command |
R1(config)#no ip domain-lookup | Turn off domain name resolution |
R1(config)#hostname SW1 | Change the host name to SW1 |
R1(config)#enable password CISCO | Configure the password to enter privileged mode |
R1(config)#interface Ethernet0/1 | Enter e0/1 interface |
R1(config-if)#no shutdown | Open interface and protocol |
R1(config-if)#shutdown | Close the interface |
R1(config)#end | Return to user mode |
R1#show ip interface brief | Briefly view the interface status |
R1#show running-config | View configured information |
R1#write | Save configuration |
Experimental description
Network topology
Experimental task
- Subnet Division
192.168.10.0/24 is proposed as the available space for address planning. There are 3 hosts in the plant area, 18 hosts in the office area and 51 hosts in the server area. Please reasonably divide the 192.168.10.0/24 network segment and assign corresponding addresses to the two areas. It is required to ensure that each area can guarantee that there are 10 spare addresses reserved for subsequent capacity expansion under the condition of saving IP resources as much as possible. Please give the IP address planning scheme. - DHCP configuration
R1 is responsible for providing automatic address acquisition to the office area and plant area, and R2 is responsible for providing static address acquisition to the server area. Please configure the dhcp service according to the address plan. The gateway of the host is the first in the network segment, and the dhcp service excludes the gateway address. - IPV6 address configuration mode
R1 is responsible for providing IPv6 address allocation to the plant. The address segment is 2001:da8:a3:1000::/64. The client obtains the IPv6 address stateless.
R1 is responsible for providing IPv6 address allocation to the office area. The address segment is 2001:da8:a3:1001::/64. The client obtains the IPv6 address through DHCP.
R2 routing is responsible for providing IPv6 address allocation to the server area. The address segment is 2001:da8:a3:1002::/64. The server statically obtains the IPv6 address. - Routing protocol
The whole network uses static routing protocol. Please configure static routing on the corresponding equipment to ensure the interconnection of IPV4/IPV6 networks in office area and server area - TELNET
To facilitate management, the router enables remote login management, and R1 and R2 configure telnet management function.
The user name is Dongda and the password is dongda@2020 , level 15.
Network node configuration
Basic configuration
#R1 configuration Router(config)#hostname R1 #Set the device name to R1 R1(config)#no ip domain-lookup #Turn off domain name resolution R1(config)#ipv6 unicast-routing #Turn on ipv6 unicast routing R1(config)#interface Ethernet0/0 #Enter Ethernet 0 / 0 interface configuration R1(config-if)#no shutdown #Open interface R1(config-if)#ip address 192.168.10.253 255.255.255.252 #Configure IP address and subnet mask R1(config-if)#ipv6 address 2001:DA8:A3:1003::1/64 #Configure IPv6 address and subnet prefix length R1(config)#interface Ethernet0/1 R1(config-if)#no shutdown R1(config-if)#ip address 192.168.10.97 255.255.255.240 R1(config-if)# ipv6 address 2001:DA8:A3:1000::1/64 R1(config)#interface Ethernet0/2 R1(config-if)#no shutdown R1(config-if)#ip address 192.168.10.65 255.255.255.224 R1(config-if)#ipv6 address 2001:DA8:A3:1001::1/64 #R2 configuration Router(config)#hostname R2 R2(config)#no ip domain-lookup R2(config)#ipv6 unicast-routing R2(config)#interface Ethernet0/0 R2(config-if)#no shutdown R2(config-if)#ip address 192.168.10.254 255.255.255.252 R2(config-if)#ipv6 address 2001:DA8:A3:1003::2/64 R2(config)#interface Ethernet0/1 R2(config-if)#no shutdown R2(config-if)#ip address 192.168.10.1 255.255.255.192 R2(config-if)#ipv6 address 2001:DA8:A3:1002::1/64
Subnet Division
The plant area is 192.168.10.96/28, with 14 available addresses.
The office area is 192.168.10.64/27, with 30 available addresses.
Server area 192.168.10.0/26, 62 available addresses.
The interconnection address is 192.168.10.252/30, and there are 2 available addresses.
DHCP configuration
#R1 configuration R1(config)#service dhcp #Start DHCP server R1(config)#ip dhcp excluded-address 192.168.10.97 #Exclude gateway addresses from the address pool R1(config)#ip dhcp excluded-address 192.168.10.65 #Exclude gateway addresses from the address pool R1(config)#ip dhcp pool dhcp-pool1 #Create a new dhcp address pool R1(dhcp-config)#network 192.168.10.64 255.255.255.224 #Create a new dhcp address pool segment R1(dhcp-config)#dns-server 114.114.114.114 #Set the dns server address issued by dhcp protocol R1(dhcp-config)#default-router 192.168.10.65 #Set default gateway address R1(dhcp-config)#lease 1 #Set the lease length to 1 R1(config)#ip dhcp pool dhcp-pool2 #Create a new dhcp address pool R1(dhcp-config)#network 192.168.10.96 255.255.255.240 #Set the 192.168.10.96 network segment in the dhcp address pool R1(dhcp-config)#dns-server 114.114.114.114 R1(dhcp-config)#default-router 192.168.10.97 R1(dhcp-config)#lease 1 #Plant PC VPCS>ip dhcp #Office PC PC(config)#no ip routing #Turn off ip forwarding PC(config)#interface Ethernet0/0 PC(config-if)#no shutdown PC(config-if)#ip address dhcp #Set the ip address to be obtained automatically using dhcp
Static address configuration
#SERVER VPCS>ip 192.168.10.2/26 192.168.10.1
IPV6 address configuration
#R1 configuration R1(config)#ipv6 dhcp pool dhcpv6 #Create a new dhcpv6 address pool named dhcpv6 R1(config-dhcpv6)#address prefix 2001:da8:a3:1001::/64 #Create a new address prefix under the ipv6 address pool R1(config-dhcpv6)#dns-server 2400:3200::1 #Configure dns server address R1(config)#interface Ethernet0/2 R1(config-if)#ipv6 nd managed-config-flag #Set the M position in the icmpv6 message to 1 R1(config-if)#no ipv6 nd ra suppress #Let the interface send icmpv6 router advertisement (RA) messages R1(config-if)#ipv6 dhcp server dhcpv6 #Use the address pool named dhcpv6 to assign ipv6 addresses to customers connected under the interface R1(config)#interface Ethernet0/1 R1(config-if)#no ipv6 nd ra suppress #Let the interface send icmpv6 router advertisement (RA) messages R1(config-if)#ipv6 dhcp server dhcpv6 #Office PC PC(config)#interface Ethernet0/0 PC(config-if)#ipv6 enable #Generate an ipv6 link local address on this interface #Plant PC VPCS>ip auto #Configuring ipv6 addresses automatically using stateless addresses #SERVER VPCS>ip 2001:da8:a3:1002::2/64
Routing protocol
#R1 configuration R1(config)#ip route 192.168.10.0 255.255.255.192 192.168.10.254 #Set ip static routing R1(config)#ipv6 route 2001:DA8:A3:1002::/64 2001:DA8:A3:1003::2 #Set ipv6 static routing #R2 configuration R2(config)#ip route 192.168.10.64 255.255.255.224 192.168.10.253 R2(config)#ip route 192.168.10.96 255.255.255.240 192.168.10.253 R2(config)#ipv6 route 2001:DA8:A3:1000::/64 2001:DA8:A3:1003::1 R2(config)#ipv6 route 2001:DA8:A3:1001::/64 2001:DA8:A3:1003::1
device management
#R1 configuration R1(config)#username dongda privilege 15 secret dongda@123 #Set the local user name and password, encrypt the password, and set the privilege level of the user R1(config)#line vty 0 4 #Open vty consoles 0 to 4 R1(config-line)#login local #Set local login authentication method R1(config-line)#transport input telnet #Setting allows telnet to access this group of consoles #R2 configuration R2(config)#username dongda privilege 15 secret dongda@123 R2(config)#line vty 0 4 R2(config-line)#login local R2(config-line)#transport input telnet
To sum up
Router basic configuration
Router(config)#hostname R1 #Set the device name to R1 R1(config)#no ip domain-lookup #Turn off domain name resolution R1(config)#ipv6 unicast-routing #Turn on ipv6 unicast routing
Router interface configuration
R1(config)#interface Ethernet0/0 #Enter Ethernet 0 / 0 interface configuration R1(config-if)#no shutdown #Open interface R1(config-if)#ip address 192.168.10.253 255.255.255.252 #Configure IP address and subnet mask R1(config-if)#ipv6 address 2001:DA8:A3:1003::1/64 #Configure IPv6 address and subnet prefix length
DHCP service configuration
Router
R1(config)#service dhcp #Start DHCP server R1(config)#ip dhcp excluded-address 192.168.10.65 #Exclude gateway addresses from the address pool R1(config)#ip dhcp pool dhcp-pool1 #Create a new dhcp address pool R1(dhcp-config)#network 192.168.10.64 255.255.255.224 #Create a new dhcp address pool segment R1(dhcp-config)#dns-server 114.114.114.114 #Set the dns server address issued by dhcp protocol R1(dhcp-config)#default-router 192.168.10.65 #Set default gateway address R1(dhcp-config)#lease 1 #Set the lease length to 1
host
Method 1
PC(config)#no ip routing #Turn off ip forwarding PC(config)#interface Ethernet0/0 #Enter the interface connected to the router PC(config-if)#no shutdown #Open interface PC(config-if)#ip address dhcp #Set the ip address to be obtained automatically using dhcp
Method 2
VPCS>ip dhcp
Static address configuration
Method 1
PC(config)#interface Ethernet0/0 #Enter Ethernet 0 / 0 interface configuration PC(config-if)#no shutdown #Open interface (config-if)#ip address 192.168.10.253 255.255.255.252 #Configure IP address and subnet mask R1(config-if)#ipv6 address 2001:DA8:A3:1003::1/64 #Configure IPv6 address and subnet prefix length
Method 2
VPCS>ip 192.168.10.2/26 192.168.10.1 #ip address / subnet prefix length gateway ip address
DHCP configuration for IPV6
Router and its interface
R1(config)#ipv6 dhcp pool dhcpv6 #Create a new dhcpv6 address pool named dhcpv6 R1(config-dhcpv6)#address prefix 2001:da8:a3:1001::/64 #Create a new address prefix under the ipv6 address pool R1(config-dhcpv6)#dns-server 2400:3200::1 #Configure dns server address R1(config)#interface Ethernet0/1 R1(config-if)#ipv6 nd managed-config-flag #Set the M position in the icmpv6 message to 1 R1(config-if)#no ipv6 nd ra suppress #Let the interface send icmpv6 router notification (RA) message R1(config-if)#ipv6 dhcp server dhcpv6 #Use the address pool named dhcpv6 to assign ipv6 addresses to customers connected under the interface
Obtain IPV6 address through DHCP
PC(config)#interface Ethernet0/0 PC(config-if)#ipv6 enable #Generate an ipv6 link local address on this interface
Configuring ipv6 addresses automatically using stateless addresses
VPCS>ip auto
Static configuration IPV6 address
VPCS>ip 2001:da8:a3:1002::2/64
Routing protocol
Destination network + subnet mask + next hop address
R1(config)#ip route 192.168.10.0 255.255.255.192 192.168.10.254 #Set ip static routing R1(config)#ipv6 route 2001:DA8:A3:1002::/64 2001:DA8:A3:1003::2 #Set ipv6 static route
TELNET device management
To establish an account for the router, you can access any interface of the router from any host connected to the router through telnet
R1(config)#username dongda privilege 15 secret dongda@123 #Set the local user name and password, encrypt the password, and set the privilege level of the user R1(config)#line vty 0 4 #Open vty consoles 0 to 4 R1(config-line)#login local #Set local login authentication method R1(config-line)#transport input telnet #Set to allow telnet access to this group of consoles