DHCP server在vlan中的使用

 

clip_image002

建立两个vlan,非别为vlan10和vlan20,使用单笔路由,在路由器R1上启用DHCP SERVER,使用两个IP POOL,192.168.1.0/24和192.168.2.0/24分别给vlan 10和vlan 20进行地址分配。

下面是各设备的配置信息:

R1的配置:

Connected to Dynamips VM "R1" (ID 0, type c2691) - Console port

% Please answer 'yes' or 'no'.
Would you like to enter the initial configuration dialog? [yes/no]: n

Press RETURN to get started!

Router>en

Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host R1
R1(config)#no ip do lo
R1(config)#line con 0
R1(config-line)#logg sy
R1(config-line)#no exec-t
R1(config-line)#exit
R1(config)#int f0/0
R1(config-if)#no sh
*Mar  1 00:25:27.571: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW1 FastEthernet1/5 (full duplex).
*Mar  1 00:25:27.843: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW1 FastEthernet1/5 (full duplex).
R1(config-if)#     
*Mar  1 00:25:29.551: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 00:25:30.551: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#speed 100
R1(config-if)#duplex
*Mar  1 00:25:45.111: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
R1(config-if)#duplex full
R1(config-if)#
*Mar  1 00:25:48.199: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW1 FastEthernet1/5 (full duplex).
R1(config-if)#
*Mar  1 00:25:51.279: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
R1(config-if)#int f0/0.1
R1(config-subif)#encapsulation dot1Q 10
R1(config-subif)#
*Mar  1 00:26:45.031: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
R1(config-subif)#ip add 192.168.1.1 255.255.255.0
R1(config-subif)#int f0/0.2
R1(config-subif)#encapsulation dot1Q 20
R1(config-subif)#ip add 192.168.2.1 255.255.255.0
R1(config-subif)#exit
R1(config)#ip dhcp pool vlan10
R1(dhcp-config)#network 192.168.1.0 255.255.255.0
R1(dhcp-config)#default-router 192.168.1.254
R1(dhcp-config)#domain-name c1813.com
R1(dhcp-config)#dns-server 192.168.1.1
R1(dhcp-config)#lease ?
  <0-365>   Days
  infinite  Infinite lease

R1(dhcp-config)#lease infinite
R1(dhcp-config)#exit
R1(config)#ip dhcp excluded-address 192.168.1.0
R1(config)#ip dhcp excluded-address 192.168.1.1
R1(config)#ip dhcp excluded-address 192.168.1.254
R1(config)#ip dhcp excluded-address 192.168.1.255
R1(config)#ip dhcp pool vlan20
R1(dhcp-config)#network 192.168.2.0 255.255.255.0
R1(dhcp-config)#domain-name c1813.com
R1(dhcp-config)#default-router 192.168.2.254
R1(dhcp-config)#dns-server 192.168.2.1
R1(dhcp-config)#lease infinite
R1(dhcp-config)#exit
R1(config)#ip dhcp excluded-address 192.168.2.0
R1(config)#ip dhcp excluded-address 192.168.2.1
R1(config)#ip dhcp excluded-address 192.168.2.254
R1(config)#ip dhcp excluded-address 192.168.2.255
R1(config)#ip dhcp excluded-address ?
  A.B.C.D  Low IP address

R1(config)#ip dhcp excluded-address 192.168.2.2 ?
  A.B.C.D  High IP address
  <cr>

R1(config)#ip dhcp excluded-address 192.168.2.2 192.168.2.30
R1(config)#exit
R1#
*Mar  1 00:39:20.315: %SYS-5-CONFIG_I: Configured from console by console
R1#sh run
Building configuration...

Current configuration : 1788 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
ip cef
!
!
no ip dhcp use vrf connected
ip dhcp excluded-address 192.168.1.0
ip dhcp excluded-address 192.168.1.1
ip dhcp excluded-address 192.168.1.254
ip dhcp excluded-address 192.168.1.255
ip dhcp excluded-address 192.168.2.0
ip dhcp excluded-address 192.168.2.1
ip dhcp excluded-address 192.168.2.254
ip dhcp excluded-address 192.168.2.255
ip dhcp excluded-address 192.168.2.2 192.168.2.30
!
ip dhcp pool vlan10
   network 192.168.1.0 255.255.255.0
   default-router 192.168.1.254
   domain-name c1813.com
   dns-server 192.168.1.1
   lease infinite
!
ip dhcp pool vlan20
   network 192.168.2.0 255.255.255.0
   domain-name c1813.com
   default-router 192.168.2.254
   dns-server 192.168.2.1
   lease infinite
!
!
no ip domain lookup
!        
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
speed 100
full-duplex
!
interface FastEthernet0/0.1
encapsulation dot1Q 10
ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0.2
encapsulation dot1Q 20
ip address 192.168.2.1 255.255.255.0
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!        
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
!
!
ip http server
no ip http secure-server
!
!
!
!
!
!
control-plane
!
!
!
line con 0
exec-timeout 0 0
logging synchronous
line aux 0
line vty 0 4
!
!
end

R1#

SW1的配置

Connected to Dynamips VM "SW1" (ID 2, type c3600) - Console port

% Please answer 'yes' or 'no'.
Would you like to enter the initial configuration dialog? [yes/no]: N
% There may not be enough space available to collect the complete crashinfo
% It would be advisable to have 280755 bytes free space on flash:crashinfo

Press RETURN to get started!

Router&gt;EN
Router#CONF T
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#HOST SW1
SW1(config)#ar  1 00:00:14.931: %LINK-3-UPDOWN: Interface FastEthernet1/10, changed state to down
SW1(config)# FastEthernet1/5, changed state to up

SW1(config)#no ip do lo
SW1(config)#line con 0
SW1(config-line)#logg sy
SW1(config-line)#no exec-t
SW1(config-line)#exit

SW1(config)#exit
*Mar  1 00:16:10.519: %SYS-5-CONFIG_I: Configured from console by console
SW1#vlan database
SW1(vlan)#vlan 10 name FA
VLAN 10 modified:
    Name: FA
SW1(vlan)#vlan 20 name IT
VLAN 20 modified:
    Name: IT
SW1(vlan)#exit
In CLIENT state, no apply attempted.
Exiting....
SW1#sh vlan-s

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0, Fa1/1, Fa1/2, Fa1/3
                                                Fa1/4, Fa1/5, Fa1/6, Fa1/7
                                                Fa1/8, Fa1/9, Fa1/10, Fa1/11
                                                Fa1/12, Fa1/13, Fa1/14, Fa1/15
10   VLAN0010                         active   
20   IT                               active   
1002 fddi-default                     active   
1003 token-ring-default               active   
1004 fddinet-default                  active   
1005 trnet-default                    active   

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
10   enet  100010     1500  -      -      -        -    -        0      0  
20   enet  100020     1500  -      -      -        -    -        0      0  
1002 fddi  101002     1500  -      0      -        -    -        1      1003
1003 tr    101003     1500  1005   0      -        -    srb      1      1002
1004 fdnet 101004     1500  -      -      1        ibm  -        0      0  
1005 trnet 101005     1500  -      -      1        ibm  -        0      0  

SW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SW1(config)#int f1/11
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 10
SW1(config-if)#no sh
SW1(config-if)#int f1/12
SW1(config-if)#sw mo acc
SW1(config-if)#sw acc vlan 20
SW1(config-if)#no sh
SW1(config-if)#int f1/1
SW1(config-if)#switchport mode trunk
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#no sh
SW1(config-if)#
*Mar  1 00:44:42.183: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/5 (not half duplex), with R1 FastEthernet0/0 (half duplex).
SW1(config-if)#
*Mar  1 00:45:55.791: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/5 (not half duplex), with R1 FastEthernet0/0 (half duplex).
SW1(config-if)#
*Mar  1 00:46:00.759: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/5 (not half duplex), with R1 FastEthernet0/0 (half duplex).
SW1(config-if)#
SW1#
*Mar  1 00:51:28.331: %SYS-5-CONFIG_I: Configured from console by console
SW1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SW1(config)#int f1/5
SW1(config-if)#sw
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#sw mo trunk
SW1(config-if)#
*Mar  1 00:56:46.359: %DTP-5-TRUNKPORTON: Port Fa1/5 has become dot1q trunk
SW1(config-if)#no sh
SW1(config-if)#EXIT
SW1(config)#EXIT
SW1#CONF
*Mar  1 01:28:50.359: %SYS-5-CONFIG_I: Configured from console by console
----------------------------------------------------------------------------
!以下设置之前vlan10和vlan20是不能互通的,虽然我们已经做了单臂路由。
SW1#CONF T
Enter configuration commands, one per line.  End with CNTL/Z.
SW1(config)#INT VLAN 10
SW1(config-if)#IP ADD 192.168.1.
*Mar  1 01:28:53.983: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up
SW1(config-if)#IP ADD 192.168.1.254 255.255.255.0
SW1(config-if)#int vlan 20
*Mar  1 02:11:23.815: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up
SW1(config-if)#ip add 192.168.2.254 255.255.255.0
SW1(config-if)#

SW2的配置:

Connected to Dynamips VM "SW2" (ID 3, type c3600) - Console port

% Please answer 'yes' or 'no'.
Would you like to enter the initial configuration dialog? [yes/no]: N
% There may not be enough space available to collect the complete crashinfo
% It would be advisable to have 280755 bytes free space on flash:crashinfo

Press RETURN to get started!

Router&gt;en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#host SW2
SW2(config)#NO IP DO LO
SW2(config)#LINE CON 0
SW2(config-line)#LOGG SY
SW2(config-line)#NO EXec-T
SW2(config-line)#EXIT
SW2(config)#
*Mar  1 00:30:55.159: %SPANTREE-7-RECV_1Q_NON_TRUNK: Received 802.1Q BPDU on non trunk FastEthernet1/2 VLAN1.
*Mar  1 00:30:55.163: %SPANTREE-7-BLOCK_PORT_TYPE: Blocking FastEthernet1/2 on VLAN1. Inconsistent port type.PVST+: restarted the forward delay timer for FastEthernet1/2

SW2(config)#int f1/2
SW2(config-if)#sw trunk encapsulation dot1q
SW2(config-if)#sw mo trunk
SW2(config-if)#
*Mar  1 00:36:50.551: %SYS-3-CPUHOG: Task is running for (2040)msecs, more than (2000)msecs (1/0),process = Exec.
-Traceback= 0x623CB284 0x6239E6C4 0x6239EEB8 0x6239F5D8 0x623C0CD0 0x623C2A0C 0x6233F188 0x623D2E98 0x6234261C 0x623302A4 0x60DAF844 0x60DAFC64 0x60DB5BA8 0x6238DA20 0x6231B21C 0x6231B064
SW2(config-if)#no sh
*Mar  1 00:36:50.827: %DTP-5-TRUNKPORTON: Port Fa1/2 has become dot1q trunk
SW2(config-if)#no sh
SW2(config-if)#int f1/11
SW2(config-if)#sw mo access
SW2(config-if)#sw acc vlan 10
SW2(config-if)#exit
SW2(config)#exit
SW2#sh vl
*Mar  1 00:39:05.123: %SYS-5-CONFIG_I: Configured from console by console
SW2#sh vlan-s

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0, Fa1/1, Fa1/3, Fa1/4
                                                Fa1/5, Fa1/6, Fa1/7, Fa1/8
                                                Fa1/9, Fa1/10, Fa1/12, Fa1/13
                                                Fa1/14, Fa1/15
10   VLAN0010                         active    Fa1/11
20   IT                               active   
1002 fddi-default                     active   
1003 token-ring-default               active   
1004 fddinet-default                  active   
1005 trnet-default                    active   

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
10   enet  100010     1500  -      -      -        -    -        0      0  
20   enet  100020     1500  -      -      -        -    -        0      0  
1002 fddi  101002     1500  -      0      -        -    -        1      1003
1003 tr    101003     1500  1005   0      -        -    srb      1      1002
1004 fdnet 101004     1500  -      -      1        ibm  -        0      0  
1005 trnet 101005     1500  -      -      1        ibm  -        0      0  
SW2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
SW2(config)#int f1/11
SW2(config-if)#no sh
SW2#
*Mar  1 00:51:43.991: %SYS-5-CONFIG_I: Configured from console by console
*Mar  1 02:13:53.131: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet1/11 (not half duplex), with PC3.c1813.com FastEthernet0/0 (half duplex)./注意这个提示警告
SW2#

PC1的配置:

Connected to Dynamips VM "PC2" (ID 6, type c2600) - Console port

              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706

Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.1(3)T,  RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Wed 19-Jul-00 16:02 by ccai
Image text-base: 0x80008088, data-base: 0x808A9264

cisco 2621 (MPC860) processor (revision 0x202) with 17408K/3072K bytes of memory.
Processor board ID 00000000000 (1880125456)
M860 processor: part number 0, mask 0
Bridging software.
X.25 software, Version 3.0.0.
2 FastEthernet/IEEE 802.3 interface(s)
128K bytes of non-volatile configuration memory.
8192K bytes of processor board System flash (Read/Write)

         --- System Configuration Dialog ---
Would you like to enter the initial configuration dialog? [yes/no]: n

Press RETURN to get started!
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.1(3)T,  RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Wed 19-Jul-00 16:02 by ccai
Router&gt;EN
Router#
Router#CONF T
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#
Router(config)#HOST PC1
PC1(config)#
PC1(config)#no ip do lo
PC1(config)#line con 0
PC1(config-line)#logg sy
PC1(config-line)#no exec-t
PC1(config-line)#exit
PC1(config)#INT F0/0
PC1(config-if)#SP
PC1(config-if)#SPeed 100
PC1(config-if)#DU
PC1(config-if)#DUplex FULL
PC1(config-if)#NO SH
PC1(config-if)#IP ADD DHcp
PC1(config-if)#Interface FastEthernet0/0 assigned DHCP address 192.168.1.2, mask 255.255.255.0
END
00:06:36: %SYS-5-CONFIG_I: Configured from console by console
PC1#SH RUN
Building configuration...

Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname PC1
!
!
!
!
!
!
memory-size iomem 15
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface FastEthernet0/0
ip address dhcp
speed 100
full-duplex
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.254 254
no ip http server
!
!
line con 0
exec-timeout 0 0
logging synchronous
transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end      

PC1# ping 192.168.2.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.3, timeout is 2 seconds:
.
Success rate is 0 percent (0/1)
PC1# ping 192.168.2.31                 /没有设置vlanIp之前

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.31, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
PC1# ping 192.168.2.31                 /设置vlanIp之后

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.31, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 336/766/1468 ms
PC1#

PC2的配置:

Connected to Dynamips VM "PC2" (ID 6, type c2600) - Console port

              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706

Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.1(3)T,  RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Wed 19-Jul-00 16:02 by ccai
Image text-base: 0x80008088, data-base: 0x808A9264

cisco 2621 (MPC860) processor (revision 0x202) with 17408K/3072K bytes of memory.
Processor board ID 00000000000 (1880125456)
M860 processor: part number 0, mask 0
Bridging software.
X.25 software, Version 3.0.0.
2 FastEthernet/IEEE 802.3 interface(s)
128K bytes of non-volatile configuration memory.
8192K bytes of processor board System flash (Read/Write)

         --- System Configuration Dialog ---

% Please answer 'yes' or 'no'.
Would you like to enter the initial configuration dialog? [yes/no]: n

Press RETURN to get started!

Router&gt;EN
Router#CONF T
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#HOST PC2
PC2(config)#no ip do lo
PC2(config)#line con 0
PC2(config-line)#logg sy
PC2(config-line)#no exec-t
PC2(config-line)#exit
PC2(config)#INT F0/0
PC2(config-if)#SP
PC2(config-if)#SPeed 100
PC2(config-if)#DU
PC2(config-if)#DUplex FU
PC2(config-if)#DUplex FUll
PC2(config-if)#IP ADD DH
PC2(config-if)#IP ADD DHcp
PC2(config-if)#NO SH
PC2(config-if)#
00:06:08: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
PC2(config-if)#END
PC2#Interface FastEthernet0/0 assigned DHCP address 192.168.2.31, mask 255.255.255.0

00:06:16: %SYS-5-CONFIG_I: Configured from console by console
PC2#PING 192.168.2.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 92/150/264 ms
PC2#PING 192.168.1.1                  /设置vlanIp之前

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
PC2#PING 192.168.1.1                   /设置vlanIp之后

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
..!!!
Success rate is 60 percent (3/5), round-trip min/avg/max = 48/410/752 ms
PC2#PING 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!..
Success rate is 60 percent (3/5), round-trip min/avg/max = 168/274/348 ms
PC2#PING 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 144/720/1280 ms
PC2#PING 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 116/229/524 ms
PC2#
PC2#
PC2#
PC2#PING 192.168.1.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 224/857/1368 ms
PC2#PING 192.168.1.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 220/758/1608 ms
PC2#PING 192.168.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 276/475/1056 ms
PC2#

PC3的配置:

Connected to Dynamips VM "PC3" (ID 7, type c2600) - Console port

              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706

Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.1(3)T,  RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Wed 19-Jul-00 16:02 by ccai
Image text-base: 0x80008088, data-base: 0x808A9264

cisco 2621 (MPC860) processor (revision 0x202) with 17408K/3072K bytes of memory.
Processor board ID 00000000000 (1880125456)
M860 processor: part number 0, mask 0
Bridging software.
X.25 software, Version 3.0.0.
2 FastEthernet/IEEE 802.3 interface(s)
128K bytes of non-volatile configuration memory.
8192K bytes of processor board System flash (Read/Write)

         --- System Configuration Dialog ---

ould you like to enter the initial configuration dialog? [yes/no]: {
% Please answer 'yes' or 'no'.
Would you like to enter the initial configuration dialog? [yes/no]: n

Press RETURN to get started!

00:00:01: %PA-2-UNDEFPA: Undefined Port Adaptor type 65535 in bay 1
00:00:07: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
00:00:07: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
00:00:07: %SYS-5-RESTART: System restarted --
Cisco Internetwork Operating System Software
IOS (tm) C2600 Software (C2600-I-M), Version 12.1(3)T,  RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
Compiled Wed 19-Jul-00 16:02 by ccai
00:00:08: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down
00:00:08: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
00:00:09: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
00:00:09: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down
Router&gt;
Router&gt;EN
Router#
Router#COFN T
         ^
% Invalid input detected at '^' marker.

Router#CONF T
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#HOST PC3
PC3(config)#no ip do lo
PC3(config)#line con 0
PC3(config-line)#logg sy
PC3(config-line)#no exec-t
PC3(config-line)#exit
PC3(config)#INT F0/0
PC3(config-if)#IP ADD DHCP
PC3(config-if)#IP ADD DHCP
PC3(config-if)#NO SH
PC3(config-if)#NO SH
PC3(config-if)#
PC3(config-if)#
PC3(config-if)#
00:06:21: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3(config-if)#
00:06:24: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
PC3(config-if)#
00:06:26: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3(config-if)#
00:07:03: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3(config-if)#Interface FastEthernet0/0 assigned DHCP address 192.168.1.3, mask 255.255.255.0

00:08:00: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3(config-if)#
00:09:01: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3(config-if)#END
PC3#
00:09:13: %SYS-5-CONFIG_I: Configured from console by console
PC3#
00:09:58: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:10:58: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:11:56: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:12:55: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:13:55: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:14:54: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:15:53: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:16:52: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:17:52: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:18:51: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:19:50: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:20:50: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:21:49: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:22:48: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:23:48: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:24:47: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:25:46: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:26:45: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:27:44: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:28:43: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:29:42: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:30:41: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:31:40: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:32:38: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:33:36: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:34:35: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:35:34: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:36:35: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:37:33: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:38:35: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:39:32: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:40:32: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:41:31: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:42:31: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:43:31: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:44:30: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:45:19: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:46:18: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:47:18: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:48:17: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:49:17: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:50:16: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#
00:51:16: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered on FastEthernet0/0 (not full duplex), with SW2 FastEthernet1/11 (full duplex).
PC3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
PC3(config)#int f0/0
PC3(config-if)#sp
PC3(config-if)#speed 100
PC3(config-if)#dup
PC3(config-if)#duplex fu
PC3(config-if)#duplex full
PC3(config-if)#end
PC3#
00:52:10: %SYS-5-CONFIG_I: Configured from console by console
PC3#sh run
Building configuration...

Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname PC3
!
!
!
!
!
!
memory-size iomem 15
ip subnet-zero
no ip domain-lookup
!
!
!
!
interface FastEthernet0/0
ip address dhcp
speed 100
full-duplex
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.1.254 254
no ip http server
!
!
line con 0
exec-timeout 0 0
logging synchronous
transport input none
line aux 0
line vty 0 4
!
no scheduler allocate
end      

PC3#sh int f0/0
FastEthernet0/0 is up, line protocol is up
  Hardware is AmdFE, address is c807.1744.0000 (bia c807.1744.0000)
  Internet address is 192.168.1.3/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Keepalive set (10 sec)
  Full-duplex, 100Mb/s, 100BaseTX/FX
  ARP type: ARPA, ARP Timeout 04:00:00
  Last input 00:00:01, output 00:00:06, output hang never
  Last clearing of "show interface" counters never
  Queueing strategy: fifo
  Output queue 0/40, 0 drops; input queue 0/75, 0 drops
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     1674 packets input, 105699 bytes
     Received 1674 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
     0 watchdog
     0 input packets with dribble condition detected
     337 packets output, 37250 bytes, 0 underruns(0/0/0)
     0 output errors, 0 collisions, 2 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
PC3#

这个例子中大家要注意的一个细节就是当互联网口的双工模式不匹配的时候,会造成什么样的结果~!

其他的配置应该在理解上没有什么大的难度~!

你可能感兴趣的:(server,职场,DHCP,VLAN,休闲)