linux下的lan、网口、Ethernet通信

 时间:2024-11-02 18:21:27

1、首先我们关闭网络接口。 # ifconfig eth0 inet down # ifconfig lo Link encap:Local Loopback ... (没有 eth0 这个条目了) # route ... (没有路由表了)

2、接下来我们启动 eth0 并给予其新的 IP 地址和路由。 # ifconfig eth0 inet up 192.168.0.111 \ netmask 255.255.255.0 broadcast 192.168.0.255 # route add -net 10.0.0.0 netmask 255.0.0.0 gw 192.168.0.1 dev eth0

3、结果是: # ifconfig eth0 Link encap:Ethernet HWaddr 08:00:46:7A:02:B0 inet addr:192.168.0.111 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 ... lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 ... # route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0 10.0.0.0 192.168.0.1 255.0.0.0 UG 0 0 0 eth0

  • 用身份证办的手机卡没注销怎么办
  • 金铲铲之战星守女团怎么玩
  • 如何查询国家政策信息
  • 五步学会朴素贝叶斯算法(Python版)
  • 建设银行龙卡通储蓄卡怎么激活?
  • 热门搜索
    ceb文件怎么打开 those怎么读 依视路镜片怎么样 膨胀螺丝怎么安装 海尔冰箱温度怎么调 便秘怎么快速排便 黑眼圈怎么消除 有狐臭怎么办 大学英语怎么说 影评怎么写