Single-arm routing for DHCP

Source: Internet
Author: User

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131227/060003MJ-0.png "title =" dhdhcp .png "/>

Router:

Vlan da

Vlan 2

Vlan 3

Exit

Conf ter

Ip dhcp exc 192.168.1.1

Ip dhcp exc 192.168.2.1

Ip dhcp pool

Net 192.168.1.0 255.255.255.0

Default-router 192.168.1.1

Dns-server 1.1.1.1

Exit

Ip dhcp pool B

Net 192.168.2.0 255.255.255.255.0

Default-router 192.168.2.1

Dns-server 1.1.1.1

Exit

Int f0/0

No shu

Int f0/0.1

Enc do 2

Ip add 192.168.1.1 255.255.255.0

Int f0/0.2

Enc do 3

Ip add 192.168.2.1 255.255.255.0

Exit

Switch:

Conf ter

Int range f0/1-5

Sw acc vlan 2

Int range f0/6-10

Sw acc vlan 3

Int f0/24

Sw mode trunk

Sw trunk allowed vlan all

Exit


PC1:

Packet Tracer PC Command Line 1.0

PC> ipconfig/all


FastEthernet0 Connection :( default port)

Physical Address ......: 0090.2B16.6C58

Link-local IPv6 Address ......: FE80: 290: 2BFF: FE16: 6C58

IP Address ......: 192.168.1.2

Subnet Mask ......: 255.255.255.0

Default Gateway ......: 192.168.1.1

DNS Servers ......

DHCP Servers ......: 192.168.1.1



PC> ipconfig/release


IP Address...

Subnet Mask ......: 0.0.0.0

Default Gateway ......: 0.0.0.0

DNS Server ......: 0.0.0.0


PC> ipconfig/renew


IP Address ......: 192.168.1.2

Subnet Mask ......: 255.255.255.0

Default Gateway ......: 192.168.1.1

DNS Server...


PC> ping 192.168.2.2


Pinging 192.168.2.2 with 32 bytes of data:


Reply from 192.168.2.2: bytes = 32 time = 15 msTTL = 127

Reply from 192.168.2.2: bytes = 32 time = 0 msTTL = 127

Reply from 192.168.2.2: bytes = 32 time = 16 msTTL = 127

Reply from 192.168.2.2: bytes = 32 time = 15 msTTL = 127


Ping statistics for 192.168.2.2:

Packets: Sent = 4, stored ED = 4, Lost = 0 (0% loss ),

Approximate round trip times inmilli-seconds:

Minimum = 0 ms, Maximum = 16 ms, Average = 11 ms

PC2:

Packet Tracer PC Command Line 1.0

PC> ipconfig/all


FastEthernet0 Connection :( default port)

Physical Address...

Link-local IPv6 Address ......: FE80: 2D0: FFFF: FE80: 55E7

IP Address...

Subnet Mask ......: 255.255.255.0

Default Gateway ......: 192.168.2.1

DNS Servers ......

DHCP Servers ......: 192.168.2.1



PC> ping 192.168.1.2


Pinging 192.168.1.2 with 32 bytes of data:


Request timed out.

Reply from 192.168.1.2: bytes = 32 time = 0 msTTL = 127

Reply from 192.168.1.2: bytes = 32 time = 30 msTTL = 127

Reply from 192.168.1.2: bytes = 32 time = 0 msTTL = 127


Ping statistics for 192.168.1.2:

Packets: Sent = 4, stored ED = 3, Lost = 1 (25% loss ),

Approximate round trip times inmilli-seconds:

Minimum = 0 ms, Maximum = 30 ms, Average = 10 ms


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.