IT/OS

Linux Network

HolyLightFollower 2006. 12. 28. 06:42
리눅스의 인터페이스 확인

#ifconfig -a



1. ifconfig를 이용한 ip설정

ifconfig eth0 aaa.bbb.ccc.ddd netmask 255.255.255.0 broadcast aaa.bbb.ccc.255 up



2. 네트워크 설정파일을 이용한 ip설정

-기본게이트웨이 설정파일

#cat /etc/sysconfig/network

-호스트 설정파일

#cat /etc/sysconfig/network-scripts/ifcfg-eth0

-기본DNS 설정파일

#cat /etc/resolv.conf



라우팅설정

-특정 네트워크 인터페이스에 기본 게이트웨이를 설정

#route add default gw aaa.bbb.ccc.1 dev eth0

-특정 네트워크 인터페이스를 통해 외부와의 통신이 가능하도록 기본게이트웨이를 설정

#route add -net aaa.bbb.ccc.1 netmask 255.255.255.0 dev eth0



netstat명령어

-옵션

netstat -a listen되는 소켓과 그렇지 않은 소켓정보 모두를 보여줌

netstat -n 10징수의 수치정보로 결과를 출력

netstat -r 설정된 라우팅정보를 출력

netstat -p 실행되고 있는 프로그램과 PID정보를 출력

netstat -i 모든 네트워크인터페이스 정보를 출력

netstat -c 결과를 연속적으로 출력

netstat -l listen되는 소켓정보를 출력

netstat -s 각 프로토콜에 대한 통계정보를 출력



랜카드 전송모드 설정

#lsmod

#cat /etc/modules.conf

-Auto모드로 설정

#modprobe ne2k-pci speed_dumplex=0

-10M half duplex모드로 설정

#modprobe ne2k-pci speed_dumplex=1

-10M full duplex모드로 설정

#modprobe ne2k-pci speed_dumplex=2

-100M half duplex모드로 설정

#modprobe ne2k-pci speed_dumplex=3

-100M full duplex모드로 설정

#modprobe ne2k-pci speed_dumplex=4