沈阳电脑维修上门服务13889116605: vlandavlan10vlan20vlan30vlan40exitconfterintvlan10ipadd192.168.1.1255.255.255.0int...
vlanda
vlan10
vlan20
vlan30
vlan40
exit
confter
intvlan10
ipadd192.168.1.1255.255.255.0
intvlan20
ipadd192.168.2.1255.255.255.0
intvlan30
ipadd192.168.3.1255.255.255.0
intvlan40
ipadd192.168.4.1255.255.255.0
iprouting
ipdhcpexcluded-address192.168.1.1
ipdhcpexcluded-address192.168.2.1
ipdhcpexcluded-address192.168.3.1
ipdhcpexcluded-address192.168.4.1
ipdhcppool1
net192.168.1.0255.255.255.0
default-ro192.168.1.1
dns-server1.1.1.1
ipdhcppool 2
net192.168.2.0255.255.255.0
default-ro192.168.2.1
dns-server1.1.1.1
ipdhcppool 3
net192.168.3.0255.255.255.0
default-ro192.168.3.1
dns-server1.1.1.1
ipdhcppool 4
net192.168.4.0255.255.255.0
default-ro192.168.4.1
dns-server1.1.1.1
exit
SW1:
confter
intf0/1
swaccvlan10
exit
intf0/2
swaccvlan20
exit
intf0/3
swmodetrunk
swtrunkallowedvlanall
exit
SW2:
confter
intf0/1
swaccvlan30
exit
intf0/2
swaccvlan40
exit
intf0/3
swmodetrunk
swtrunkallowedvlanall
exit
测试:
PacketTracerPCCommandLine1.0
PC>ipconfig/all
FastEthernet0Connection:(defaultport)
PhysicalAddress................:0030.F2BB.C910
Link-localIPv6Address.........:FE80::230:F2FF:FEBB:C910
IPAddress......................:192.168.1.2
SubnetMask.....................:255.255.255.0
DefaultGateway.................:192.168.1.1
DNSServers.....................:1.1.1.1
DHCPServers....................:192.168.1.1
PC>ipconfig/release
IPAddress......................:0.0.0.0
SubnetMask.....................:0.0.0.0
DefaultGateway.................:0.0.0.0
DNSServer......................:0.0.0.0
PC>ipconfig/renew
IPAddress......................:192.168.1.2
SubnetMask.....................:255.255.255.0
DefaultGateway.................:192.168.1.1
DNSServer......................:1.1.1.1
PC>ipconfig/all
FastEthernet0Connection:(defaultport)
PhysicalAddress................:0030.F2BB.C910
Link-localIPv6Address.........:FE80::230:F2FF:FEBB:C910
IPAddress......................:192.168.1.2
SubnetMask.....................:255.255.255.0
DefaultGateway.................:192.168.1.1
DNSServers.....................:1.1.1.1
DHCPServers....................:192.168.1.1
PC>ping192.168.4.2
Pinging192.168.4.2with32bytesofdata:
Requesttimedout.
Replyfrom192.168.4.2:bytes=32time=0msTTL=127
Replyfrom192.168.4.2:bytes=32time=15msTTL=127
Replyfrom192.168.4.2:bytes=32time=16msTTL=127
Pingstatisticsfor192.168.4.2:
Packets:Sent=4,Received=3,Lost=1(25%loss),
Approximateroundtriptimesinmilli-seconds:
Minimum=0ms,Maximum=16ms,Average=10ms
PC>ping192.168.3.2
Pinging192.168.3.2with32bytesofdata:
Requesttimedout.
Replyfrom192.168.3.2:bytes=32time=0msTTL=127
Replyfrom192.168.3.2:bytes=32time=0msTTL=127
Replyfrom192.168.3.2:bytes=32time=15msTTL=127
Pingstatisticsfor192.168.3.2:
Packets:Sent=4,Received=3,Lost=1(25%loss),
Approximateroundtriptimesinmilli-seconds:
Minimum=0ms,Maximum=15ms,Average=5ms
PC>ping192.168.2.2
Pinging192.168.2.2with32bytesofdata:
Requesttimedout.
Replyfrom192.168.2.2:bytes=32time=16msTTL=127
Replyfrom192.168.2.2:bytes=32time=15msTTL=127
Replyfrom192.168.2.2:bytes=32time=0msTTL=127
Pingstatisticsfor192.168.2.2:
Packets:Sent=4,Received=3,Lost=1(25%loss),
Approximateroundtriptimesinmilli-seconds:
Minimum=0ms,Maximum=16ms,Average=10ms
上一篇:三层交换实现DHCP功能