리눅스 네트워크 관련 파일 및 명령어
ip addr show
- 인터페이스 정보 및 ip 확인 가능
IP 설정
ifconfig [장치명] [ip주소] netmask [서브넷마스크] broadcast [브로드캐스트] up
ifconfig eth0 10.41.116.90 netmask 255.255.255.192
tb conf addr add eth0 [ip주소/bit] 도 가능
- IP 설정 후 아래 네트워크 기본 설정 파일 수정
1. /etc/sysconfig/network-scripts/ifcfg-eth0 // IP, 서브넷 마스크, 네트워크 수정
2. /etc/sysconfig/network // 게이트웨이 수정
3. /etc/hosts // DNS 수정
/etc/protocols // 프로토콜 번호 확인
4. service network restart & /etc/rc.d/init.d/network restart // 네트워크 설정 적용
- Centos8

- cat /etc/systemd/network/eth0.network // cnetos8 은 해당 경로에서 변경
- systemctl restart systemd-networkd.service // 해당 변경 사항 저장
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
- ipmi ip 설정
1. tb conf ipmi (ip) (subnet) (gate-way)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ethtool eth0 // eth0 장치의 속도 확인 가능
ethtool -i eth0 // eth0 장치의 버전, 펌웨어 확인 가능
eth0 속도 변경 방법
ethtool -s eth0 speed 1000 duplex full autoneg on
- eth0 의 속도 변경 -> 10G로 변경시 10000으로 숫자만 바꿔주면 된다
- 속도 변경 후 장비가 리붓되면 초기화가 되기 때문에 아래 파일 수정 필요
- vi /etc/sysconfig/network-script/ifcfg-eth0
- ETHTOOL_OPTS=“speed 1000 duplex full autoneg on” 추가
- ethtool -i eth0 명령어로 드라이버 버전 확인
- modprobe [드라이버] Duplex=0 // [ 0=auto-negotiate , 1=half , 2=full ]
'Network' 카테고리의 다른 글
static ip 설정 (0) | 2021.11.27 |
---|---|
ACL (0) | 2021.11.24 |