Chinaunix首页 | 论坛 | 博客
  • 博客访问: 647428
  • 博文数量: 139
  • 博客积分: 2655
  • 博客等级: 少校
  • 技术积分: 1723
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-02 16:03
文章分类

全部博文(139)

文章存档

2013年(2)

2011年(17)

2010年(14)

2009年(86)

2008年(20)

分类: LINUX

2008-11-11 22:29:05

这几天正在看TCP/IP,发现以前对网络知识认识的不够,另外好些命令的选项都没用过,比如说ifconfig的

broadcast选项 :设置广播地址,虽说可根据IP和netmask自动计算出,但未防止ping
广播风暴,也有人另外设置合法的IP地址.
ifconfig eth0 ip netmask add1 broadcast add2

metric N:
          This parameter sets the interface metric.

mtu N:
          This parameter sets the Maximum Transfer Unit (MTU) of an interface.

add addr/prefixlen :
          Add an IPv6 address to an interface.
del addr/prefixlen :
          Remove an IPv6 address from an interface.

pointopoint [addr]:设置点到点的直接连接

tunnel aa.bb.cc.dd :和VPN有关
          Create a new SIT (IPv6-in-IPv4) device, tunnelling to the  given destination.
hw class hwaddress:设置MAC地址(其中class包括ether(Ethernet), ax25 (AMPR AX.25), ARCnet  and  netrom(AMPR NET/ROM).)
ifconfig eth0 hw ether hwaddress

route可以设置网关
netstat的 -i -f net(这个偶机器上没有,--inet|--p)
ping -R :记录路由(这个实际显示的顺序和TCP/IP书上说的有些差别)
比如说ping -R 58.192.114.8得到如下结果:
RR: 10.14.2.90
    10.0.0.26
    10.0.0.2
    58.192.114.1
    58.192.114.8
    10.0.0.1
    10.0.0.25
    10.14.0.1
    10.14.2.90
而traceroute -n 58.192.114.8得到:
 1  10.14.0.1  0.683 ms  0.834 ms  0.936 ms
 2  10.0.0.25  0.357 ms  0.447 ms  0.497 ms
 3  10.0.0.1  0.356 ms  0.427 ms  0.484 ms
 4  58.192.114.8  0.401 ms  0.395 ms  0.393 ms
TCP协议有些东西搞的还不是太懂,待以后慢慢消化.
阅读(1757) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~