( Application presentation session transport network data link physic )
host : end device ( PC Server )
switch : to connect many device
router : to connect two or more different networks
internet cable : straight cable and crossover cable
The straight through cable is used to connect:
- switch to router
- switch to pc/server
The crossover cable is used to connect:
- switch to switch
- router to router
- router to pc/server
- pc/server to pc/server
192.168.0.0 /16 ( 16个1 )
11111111.11111111.00000000.00000000
255.255.0.0
It means that the first address of this network ( the network address ) is : 192.128.00000000.00000000 => 192.168.0.0
The last address of this network ( the broadcast address ) is 192.16811111111.11111111 => 192.168.255.255
And the range of IP address for the host is from 192.168.00000000.00000001 => 192.168.0.1 to 192.168.11111111.11111110 => 192.168.255.254
Let’s devide this network into smaller subnetworks.
Always start by the biggest subnetwork which contains the biggest number of hosts..
Office subnetwork : 511 hosts
So we need 511 IP adderss for the hosts ( end device ) + 1 IP address for the network address +1IP address as a broadcast address = 511 + 1 + 1 = 513 IP addresses
2^9=512 <range for 513 IP addresses < 2^10=1024
1024 in binary is : 0000 0100 0000 0000
So for this subnetwork, we will use the following subnet mask : 11111111.11111111.11111100.00000000 => 255.255.252.0 or /22
So to create the Office subnetwork as a part os the big 192.168.0.0/16 network, we will start at the beginning os this big network.
So the network address of our Office subnetwork will be the first address of the big network : 192.168.0.0/22 ( the host part of the subnet mask is 00.00000000 )
The broadcast address will be : 192.168.3.255/22 ( The host part of the subnet mask is 11.11111111 )
So the range of IP addresses for the hosts will be : from 192.168.0.1/22 to 192.168.3.254/22
we will also book the last host IP address for the gateway ( =router ),so the gateway address of this subnetwork is ; 192.168.3.254
Then, for the factory subnetwork :
128(2^7) < 250 IPs =1=1 = 252 < 256(2^8)
So the subnet mask for this subnetwork is : 11111111.11111111.11111111.00000000 => 255.255.255.0 or /24
network address : 192.168.4.0/24 ( this is the next available address of the big network )
broadcast address : 192.168.4.255/24
IP range for hosts : 192.168.4.1/24 to 192.268.4.254/24
gateway is : 192.168.4.154/24
For the small subnetwork OfficeRTR < - > EdgeRTR :
This is a PtP ( Point to Point ) connection,that means we connect only two devices together.So we need 2+1+1 = 4 IP addresses in this network
subnet mask : 11111111.11111111.11111111.11111100 => 255.255.252 or 30
network address : 192.168.5.4/30 ( this is the next available address of the big network )
.
.
.
.
enable
configure terminal
interface gigabitEthernet
ip adress …(last IP address)
no shutdown
exit
in
自动填充命令语句
重现之前用过的语句
Configure R1
en
conf t
hostname R1
no ip domain-lookup
enable secret class
banner motd #Do not touch my router#
line con 0
password cisco
exit
line vty 0 4
password cisco
exit
interface fastEthernet 0/0
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
interface serial 0/0/0
ip address 192.168.2.1 255.255.255.0
clock rate 64000
exit
end
copy runnig-config startup-config
Configure R2 :
en
conf t
hostname R2
no ip domain-lookup
enable secret class
banner motd #Do not touch my router#
line con 0
password cisco
exit
line vty 0 4
password cisco
exit
interface fastEthernet 0/0
ip address 192.168.3.1 255.255.255.0
no shutdown
exit
interface serial 0/0/0
ip address 192.168.2.2 255.255.255.0
clock rate 64000
exit
end
copy runnig-config startup-config