리눅스 설정 방법

 

1. 네트워크 관련 설정 파일 설정

 ---------------------------------------------------------------------------

/etc/resolv.conf : nameserver

/etc/modules.conf : interface alias , duplex

/etc/sysconfig/network : default gateway , hostname

/etc/sysconfig/network-scripts/ifcfg-eth0 : ipaddr , netmask , broadcast

/etc/sysconfig/static-routes : static으로 설정되어 있는 routing table 정보

---------------------------------------------------------------------------

 

1. NICduplex상태 확인 및 설정

#ethtool eth0 : duplex및 속도 확인

#ethtool -s eth0 duplex full : duplex full로 설정

#ethtool -s eth0 speed 100 : speed 100으로 설정

 

/etc/modules.conf : 부팅시 설정하기 위해서 사용하는 file

alias  eth0  e100

alias  eth1  e100

options e100 e100_speed_duplex=4,4 // 1=10half;2=10full;3=100half;4=100full

* modules.conf에서 option duplex를 설정하는 방법은 NIC마다 다르므로 확인한 후 사용하여야 함.

위 예는 intel NIC를 설정하는것을 보인것임.

 

2. 수동으로 NIC 올리기

-기본값으로 UP / DOWN

#ifconfig eth0 plumb (사용)

#ifconfig eth0 up

#ifconfig eth0 down

#ifconfig eth0 unplumb(사용안함)

 

-값을 지정하여 올리기

#ifconfig eth0 211.41.84.222 netmask 255.255.255.0 broadcast 211.41.84.255 up

 

-인테페이스 사용/미사용

#ifconfig eth0 plumb (사용)

#ifconfig eth0 unplumb (미사용)

 

 

3. routing 수동 설정 방법

routing table에 설정할 내용

----------------------------------------------------

  NIC ip network주소에 대한 routing table

 local주소에 대한 routing table

 default gateway

 static routing table

----------------------------------------------------

#route add -net 211.41.84.0 netmask 255.255.255.0 dev eth0 : network주소에 대한 routing table등록

#route add -net 172.24.9.0 netmask 255.255.255.0 gw 172.24.64.1 dev eth1 : static route 등록

#route add default gw 211.41.84.234 dev eth0 : default gateway등록. /etc/sysconfig/network확인

 

#route add -host 211.41.84.111 gw xxx.xxx.xxx.xxx dev eth0 : 특정 호스트에 대한 routing table등록.

* netmask가 빠짐을 주의

 

/etc/sysconfig/static-routes : 그외 static으로 등록하여야 할 것(paran.com)

any net 172.24.9.0  netmask 255.255.255.0 gw 172.24.64.1 metric 1

any net 172.16.0.0  netmask 255.240.0.0   gw 172.24.64.1 metric 1

any net 10.0.0.0    netmask 255.0.0.0     gw 172.24.64.1 metric 1

any net 192.168.0.0 netmask 255.255.0.0   gw 172.24.64.1 metric 1

 

 

 

- 간단 요약 -

IP 설정 정보 확인
1. IP 주소
2. 넷마스크
3. G/W 주소
4. DNS 주소
5. 네트웍 주소


네트웍 설정
1. /etc/hosts

2. /etc/resolv.conf

3. 호스트 이름, 게이트웨이, 게이트웨이로 갈 장치 등을 설정
/etc/sysconfig/network 파일 수정
ex)  1  NETWORKING=yes
     2  HOSTNAME=kwsweb04
     3  GATEWAY=211.41.73.129
     4  GATEWAYDEV=eth0

4. 인터페이스 설정
/etc/sysconfig/network-scripts/ifcfg-eth0
ex)  1  DEVICE=eth0
     2  BOOTPROTO=static
     3  BROADCAST=211.41.73.191
     4  IPADDR=211.41.73.144
     5  NETMASK=255.255.255.192
     6  NETWORK=211.41.73.128
     7  ONBOOT=yes
각 인터페이스마다 설정한다.
5. /etc/rc.d/init.d/network restart
또는 간단히 service network restart


네트웍 설정 확인
# ping www.paran.com
# ifconfg -a | more
# mii-tool
ftp나 sftp 등으로 속도 테스트

※ 원문 : http://cafe.naver.com/quest4i/69

반응형
Posted by She쥐포s

블로그 이미지
She쥐포s
Yesterday
Today
Total

달력

 « |  » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최근에 올라온 글

최근에 달린 댓글

글 보관함