Chinaunix首页 | 论坛 | 博客
  • 博客访问: 946340
  • 博文数量: 94
  • 博客积分: 15249
  • 博客等级: 上将
  • 技术积分: 2516
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-04 00:17
文章分类

全部博文(94)

文章存档

2013年(3)

2012年(7)

2011年(25)

2010年(51)

2008年(8)

分类: 系统运维

2012-07-15 17:30:58

偷懒,直接CP了

New features:
* VPCs now checks for duplicate addresses when assigning IPv4 addresses
* DNS is now supported
* Much more extensive help
* tracert has been simplified to just trace, and allows for protocols other than UDP (TCP & ICMP)
* Some commands have been replaced with more logical syntax, but usually the old syntax still works:

arp     is now show arp
dhcp    is now ip dhcp
ver     is now show version
history is now show history

New commands:

help (same as ?)
rlogin (telnet to a port on a host)
sleep (useful in scripts)
set dump (great for seeing protocols at work)

Modified commands:
arp  (now show arp - with more options)
dhcp (now ip dhcp - with more options)
show (many more options)
clear (more options)
ip (more options including DNS)
set (more options)
trace (formally tracert, more options)

Bug fixes:
The source port for pings to TCP & UDP ports is now random, allowing it to work through firewalls
DHCP now sets option 12 (Host Name) correctly in the DHCP Discover
The echo command no longer leaves blank lines between output


Details:

* Many more options for the show command:

show [arp [|all]|dump|echo|history|ip [|all]|ipv6 [|all]]
    arp [|all]   Show arp table for VPC or all VPCs
    dump [|all]  Show dump flags for VPC or all VPCs
    echo                Show the status of the echo flag (see set echo)
    history             List the command history
    ip [|all]    Show IPv4 details for VPC or all VPCs
                        Shows VPC Name, IP address, mask, gateway, DNS, MAC, 
                        lport, rhost:rport and MTU
    ipv6 [|all]  Show IPv6 details for VPC or all VPCs
                        Shows VPC Name, IPv6 addresses/mask, gateway, MAC,
                        lport, rhost:rport and MTU
    version             Show the version information

  Notes: if and are missing, arp/dump/ip/ipv6 will display
         the current VPC.
         
* In particular, the new show ip and show ipv6 commands are really useful

show ip [|all]
  Show IPv4 details for VPC (default this VPC) or all VPCs, including
  VPC Name, IP address, mask, gateway, DNS, MAC, lport, rhost:rport and MTU.
  

Examples:
VPCS[2]> show ip 2

NAME        : VPCS[1]
IP/MASK     : 10.0.1.2/24
GATEWAY     : 10.0.1.1
DNS         : 200.1.95.1  
DHCP SERVER : 10.0.1.1
DOMAIN NAME : acme.com
MAC         : 00:50:79:66:68:00
LPORT       : 20000
RHOST:PORT  : 127.0.0.1:30000
MTU:        : 1500


VPCS[4]> show ip all

NAME   IP/MASK              GATEWAY           MAC                DNS
VPCS1  10.0.1.2/24          10.0.1.1          00:50:79:66:68:00  200.1.95.1                                                    
VPCS2  10.0.1.3/24          10.0.1.1          00:50:79:66:68:01  200.1.95.1                                                    
VPCS3  200.1.0.3/24         200.1.0.1         00:50:79:66:68:02                                                                
VPCS4  200.1.0.4/24         200.1.0.1         00:50:79:66:68:03                                                                
VPCS5  0.0.0.0/0            0.0.0.0           00:50:79:66:68:04                                                                
VPCS6  0.0.0.0/0            0.0.0.0           00:50:79:66:68:05                                                                
VPCS7  0.0.0.0/0            0.0.0.0           00:50:79:66:68:06                                                                
VPCS8  0.0.0.0/0            0.0.0.0           00:50:79:66:68:07                                                                
VPCS9  0.0.0.0/0            0.0.0.0           00:50:79:66:68:08        



VPCS[1]> show ipv6 ?

show ipv6 [|all]
  Show IPv6 details for VPC (default this VPC) or all VPCs, including
  VPC Name, IP address, mask, gateway, DNS, MAC, lport, rhost:rport and MTU
  
  
Examples:
VPCS[4]> show ipv6

NAME              : VPCS[4]
LINK-LOCAL SCOPE  : fe80::250:79ff:fe66:6803/64
GLOBAL SCOPE      : 2001:db8::4/64
ROUTER LINK-LAYER : c2:01:09:98:00:00
MAC               : 00:50:79:66:68:03
LPORT             : 20003
RHOST:PORT        : 127.0.0.1:30003
MTU:              : 1500


VPCS[4]> show ipv6 all

NAME   IP/MASK                              ROUTER LINK-LAYER  MTU
VPCS1  fe80::250:79ff:fe66:6800/64
       2001:db8:0:a:2050:79ff:fe66:6800/64  c2:00:09:98:00:00  1500
VPCS2  fe80::250:79ff:fe66:6801/64
       2001:db8:0:a:2050:79ff:fe66:6801/64  c2:00:09:98:00:00  1500
VPCS3  fe80::250:79ff:fe66:6802/64
       2001:db8::3/64                       c2:01:09:98:00:00  1500
VPCS4  fe80::250:79ff:fe66:6803/64
       2001:db8::4/64                       c2:01:09:98:00:00  1500
VPCS5  fe80::250:79ff:fe66:6804/64                                
VPCS6  fe80::250:79ff:fe66:6805/64                                
VPCS7  fe80::250:79ff:fe66:6806/64                                
VPCS8  fe80::250:79ff:fe66:6807/64                                
VPCS9  fe80::250:79ff:fe66:6808/64                                


* A new set dump command, great for debugging protocols:

set dump [detail|mac|raw|all|off]
  Set the packet dump flag for this VPC
    detail  print protocol
    mac     print ether address
    raw     print the first 40 bytes
    all     all the packets including incoming
            must use [detail|mac|raw] as well as 'all'
    off     clear all the flags

* New options for dhcp, including a decode option to display the contents of the dhcp packets:

ip dhcp [-options]
  Attempt to obtain IPv4 address, mask, gateway and DNS via DHCP
  options:
    -d         Show DHCP packet decode
    -r         Renew DHCP lease
    -x         Release DHCP lease

* More flexible ip address settings, and new settings for DNS and dhcp:

ip [arguments]
  Configure the current VPC's IP settings
  arguments:
   
[/] []
   
[] [/]
                   Set the VPC's ip, default gateway ip and network mask
                   Default IPv4 mask is /24, IPv6 is /64. In the ether mode, 
                   the ip of the tapx is the maximum host ID of the subnet. 
                   ip 10.1.1.70 /26 10.1.1.65 set the VPC's ip to 10.1.1.70, 
                   the gateway to 10.1.1.65, the netmask to 255.255.255.192, 
                   the tapx ip to 10.1.1.126 in the ether mode.
                    may be written as /26, 26 or 255.255.255.192
    auto           Attempt to obtain IPv6 address, mask and gateway using SLAAC
    dhcp -[d|r|x]  Attempt to obtain IPv4 address, mask, gateway, DNS via DHCP
          -d         Show DHCP packet decode
          -r         Renew DHCP lease
          -x         Release DHCP lease
    dns       Set DNS server , delete if is '0'
    mtu    Set IPv4 MTU to , at least 576. 
    
Examples:
VPCS[3]> ip 200.1.0.3 /24 200.1.0.1
Checking for duplicate address...
PC3 : 200.1.0.3 255.255.255.0 gateway 200.1.0.1

VPCS[1]> ip dhcp -d
Opcode: 1 (REQUEST)
Client IP Address: 0.0.0.0
Your IP Address: 0.0.0.0
Server IP Address: 0.0.0.0
Gateway IP Address: 0.0.0.0
Client MAC Address: 00:50:79:66:68:00
Option 53: Message Type = Discover
Option 12: Host Name = VPCS1
Option 61: Client Identifier = Hardware Type=Ethernet MAC Address = 00:50:79:66:68:00

Opcode: 2 (REPLY)
Client IP Address: 0.0.0.0
Your IP Address: 10.0.1.2
Server IP Address: 0.0.0.0
Gateway IP Address: 0.0.0.0
Client MAC Address: 00:50:79:66:68:00
Option 53: Message Type = Offer
Option 54: DHCP Server = 10.0.1.1
Option 51: Lease Time = 63180
Option 58: Renewal Time = 31590
Option 59: Rebinding Time = 55282
Option 1: Subnet Mask = 255.255.255.0
Option 3: Router = 10.0.1.1
Option 6: DNS Server = 200.1.95.1 
Option 15: Domain = acme.com

Opcode: 1 (REQUEST)
Client IP Address: 10.0.1.2
Your IP Address: 0.0.0.0
Server IP Address: 0.0.0.0
Gateway IP Address: 0.0.0.0
Client MAC Address: 00:50:79:66:68:00
Option 53: Message Type = Request
Option 54: DHCP Server = 10.0.1.1
Option 50: Requested IP Address = 10.0.1.2
Option 61: Client Identifier = Hardware Type=Ethernet MAC Address = 00:50:79:66:68:00
Option 12: Host Name = VPCS1

Opcode: 2 (REPLY)
Client IP Address: 10.0.1.2
Your IP Address: 10.0.1.2
Server IP Address: 0.0.0.0
Gateway IP Address: 0.0.0.0
Client MAC Address: 00:50:79:66:68:00
Option 53: Message Type = Ack
Option 54: DHCP Server = 10.0.1.1
Option 51: Lease Time = 86400
Option 58: Renewal Time = 43200
Option 59: Rebinding Time = 75600
Option 1: Subnet Mask = 255.255.255.0
Option 3: Router = 10.0.1.1
Option 6: DNS Server = 200.1.95.1 
Option 15: Domain = acme.com


 IP 10.0.1.2/24 GW 10.0.1.1
    
* New rlogin command allows you to telnet to router console ports directly from VPCs

rlogin []
  Telnet to at (def 127.0.0.1) relative to HOST PC. 
  To attach to the console of a virtual router running on port 2000 of this
  host PC, use rlogin 2000
  To telnet to the port 2004 of a remote host 10.1.1.1, use
  rlogin 10.1.1.1 2004


* New sleep command, useful in the execution of scripts

sleep [] []
  Print and pause execution of script for .
  If =0 or missing, pause until a key is pressed. 
  See load


* New command trace (replaces tracert) allows tracing a path to a host using UDP/TCP or ICMP

trace [-options]
  Print the path take to network . can be an ip address or name.
    options:
      -P  Use IP in trace packets
                     1 - icmp, 17 - udp (default), 6 - tcp  
      -m       maximum TTL, default 8
               Same as -m option, compatible with the old version
阅读(2253) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~