Linux命令学习之网络相关命令

上一篇 / 下一篇  2011-03-03 16:11:52 / 个人分类:Linux命令学习

==》1)重启网络:sudo /etc/init.d/network restart
==》2)SLES上修改网络通过yast2
==》3)RHEL上修改网络通过setup
==》4)检查接口是否已被用telnet <IP> <port>
==》5)ifconfig eth0:0 9.189.88.175 netmask 255.255.255.0 up
==》6)sudo /etc/init.d/xinetd restart
==》7)检查网络状态
    netstat -an |grep -c TIME_WAIT
    netstat -anp|grep 80
    查找占用80端口的process
==》8)网络相关问题
    ****************************************************
    * i)"No network device found. Load a network module first" error happened on Sles10
    *
    * Resolusion:
    * > You will then have to kill dhcpcd service and then type:
    * > /sbin/dhcpcd -B eth0
    * > Run: ifconfig
    * > You should now have an IP Address after running the dhcpcd command.
    *
    ****************************************************
    ***************************************************
    * ii) change network to dynamic ip address on SLES10 including Xen
    *
    * http://linux.chinaunix.net/techdoc/net/2008/12/30/1055678.shtml
    * /etc/xen/scripts/network-bridge stop netdev=eth0
    * yast network (Network card name: ×)
    *
    ********************************************************
    ********************************************************
    * iii) SLES10 network config(动态地址配置)
    *
    * yast2
    * vi /etc/sysconfig/network/ifcfg-eth0
    * BOOTPROTO='dhcp'
    * BROADCAST=''
    * ETHTOOL_OPTIONS=''
    * IPADDR=''
    * MTU=''
    * NAME='82801DB PRO/100 VE (LOM) Ethernet Controller'
    * NETMASK=''
    * NETWORK=''
    * REMOTE_IPADDR=''
    * STARTMODE='auto'
    * USERCONTROL='no'
    * 重启网络服务rcnetwork restart
    *
    *静态地址配置
    *vi /etc/sysconfig/network-scripts/ifcfg-eth0
    *DEVICE=eth0
    *#BOOTPROTO=dhcp
    *BOOTPROTO=static
    *IPADDR=192.168.1.289
    *NETMASK=255.255.255.0
    *GATEWAY=192.168.1.1
    *ONBOOT=yes
    *TYPE=Ethernet
    *(重启使IP地址生效)
    */sbin/ifdown eth0
    */sbin/ifup eth0
    *(配置DNS解析)
    *Echo "nameserver 218.135.1.35">>/etc/resolv.conf
    *通知网关更新信息
    */etc/init.d/network restart
    *修改/etc/hosts文件
    *把127.0.0.1改为192.168.1.289
    *
    ********************************************************
    ********************************************************
    *
    * iv) FireWall on SLES
    *
    * ----open port 8070 to access AppBuilder:
    * Perform. the following as "root" - from the idcuser, "sudo su -"
    * Edit /etc/sysconfig/SuSEfirewall2 file,
    * Add 8070 to the following line (space separated ): FW_SERVICES_EXT_TCP="22 80 443 2809 8880 9401 9403 9402 9060"
    * Recycle the firewall, execute  “/sbin/SuSEfirewall2 stop” then “/sbin/SuSEfirewall2 start”
    * ----yast -> Security and Users -> Firewall
    *
    ********************************************************

TAG:

 

评分:0

我来说两句

日历

« 2024-04-18  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 13340
  • 日志数: 38
  • 书签数: 9
  • 建立时间: 2010-12-22
  • 更新时间: 2011-04-11

RSS订阅

Open Toolbar