내맘대로긍정이 알려주는
Oracle 23ai 신기능
무료 세미나 발표자료
OS환경 : Oracle Linux 7.6 (64bit)
방법 : Linux 7 에서 네트워크 설정
새로 추가한 네트워크 카드(NIC) 에 IP 할당하는 방법을 설명함
Oracle RAC 구성을 위해 public ip, priv ip 설정시에도 아래 내용을 참고하면됨
기존 네트워크 확인
1 2 3 | # nmcli con show NAME UUID TYPE DEVICE virbr0 d3f998fd-8b0e-44e5-83f9-b0fe7ca669fb bridge virbr0 |
현재는 사용하지 않는 virbr0 외에는 다른 네트워크는 존재하지 않음
장치(device) 확인
1 2 3 4 5 6 7 | # nmcli dev status DEVICE TYPE STATE CONNECTION virbr0 bridge connected virbr0 ens161 ethernet disconnected -- ens224 ethernet disconnected -- lo loopback unmanaged -- virbr0-nic tun unmanaged -- |
설정(연결)되지 않은 ens161, ens224 장치가 존재함
ens161 장치로 static-ens161 이라는 이름으로 정적 연결(connection) 생성
1 2 | # nmcli con add con-name "static-ens161" ifname ens161 type ethernet ip4 192.168.10.241/24 gw4 192.168.10.1 Connection 'static-ens161' (3ae21aaf-cd1a-4448-bfdf-d85b5693823d) successfully added. |
static-ens161 에 dns 추가
1 | # nmcli con mod "static-ens161" ipv4.dns 168.126.63.1 |
설정된 연결 확인(down, disconnect 되어있는 연결까지 확인)
1 2 3 4 5 | # nmcli con show NAME UUID TYPE DEVICE static-ens161 3ae21aaf-cd1a-4448-bfdf-d85b5693823d ethernet ens161 virbr0 d3f998fd-8b0e-44e5-83f9-b0fe7ca669fb bridge virbr0 |
설정된 연결 확인(up, connect 되어있는 연결만 확인) --active 옵션
1 2 3 4 5 | # nmcli con show --active NAME UUID TYPE DEVICE static-ens161 3ae21aaf-cd1a-4448-bfdf-d85b5693823d ethernet ens161 virbr0 d3f998fd-8b0e-44e5-83f9-b0fe7ca669fb bridge virbr0 |
설정된 연결 상세 확인(ip addr show 명령)
1 2 3 4 5 6 7 | # ip addr show ens161 2: ens161: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:0c:29:7b:b2:32 brd ff:ff:ff:ff:ff:ff inet 192.168.10.241/24 brd 192.168.10.255 scope global noprefixroute ens161 valid_lft forever preferred_lft forever inet6 fe80::7853:114b:7aa1:b135/64 scope link noprefixroute valid_lft forever preferred_lft forever |
두번째 장치인
ens224 장치로 static-ens224 이라는 이름으로 정적 연결(connection) 생성
1 2 | # nmcli con add con-name "static-ens224" ifname ens224 type ethernet ip4 10.10.10.10 nmcli con show --active |
설정된 연결 확인(up, connect 되어있는 연결만 확인) --active 옵션
1 2 3 4 5 6 | # nmcli con show --active NAME UUID TYPE DEVICE static-ens161 3ae21aaf-cd1a-4448-bfdf-d85b5693823d ethernet ens161 static-ens224 0ce6354d-95f2-4f78-ad5c-7d19b139c2af ethernet ens224 virbr0 d3f998fd-8b0e-44e5-83f9-b0fe7ca669fb bridge virbr0 |
설정된 연결 상세 확인(ip addr show 명령)
1 2 3 4 5 6 7 | # ip addr show ens224 3: ens224: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 link/ether 00:0c:29:7b:b2:1e brd ff:ff:ff:ff:ff:ff inet 10.10.10.10/32 brd 10.10.10.10 scope global noprefixroute ens224 valid_lft forever preferred_lft forever inet6 fe80::1c49:b64a:503c:8c9/64 scope link noprefixroute valid_lft forever preferred_lft forever |
설정된 연결 상세 확인(ifconfig 명령)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # ifconfig ens161: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.10.241 netmask 255.255.255.0 broadcast 192.168.10.255 inet6 fe80::7853:114b:7aa1:b135 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:7b:b2:32 txqueuelen 1000 (Ethernet) RX packets 1814 bytes 209363 (204.4 KiB) RX errors 0 dropped 39 overruns 0 frame 0 TX packets 1140 bytes 222394 (217.1 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ens224: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.10.10.10 netmask 255.255.255.255 broadcast 10.10.10.10 inet6 fe80::1c49:b64a:503c:8c9 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:7b:b2:1e txqueuelen 1000 (Ethernet) RX packets 317 bytes 48579 (47.4 KiB) RX errors 0 dropped 38 overruns 0 frame 0 TX packets 119 bytes 10978 (10.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
추가 참조 1. 연결 해제 및 확인 방법
ens161 연결 해제(down, disconnect)
1 2 | # nmcli con down "static-ens161" Connection 'static-ens161' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/4) |
설정된 연결 확인(down, disconnect 되어있는 연결까지 확인)
1 2 3 4 | # nmcli con show NAME UUID TYPE DEVICE virbr0 d3f998fd-8b0e-44e5-83f9-b0fe7ca669fb bridge virbr0 static-ens161 3ae21aaf-cd1a-4448-bfdf-d85b5693823d ethernet -- |
ens161 재연결(up, connect)
1 2 | # nmcli con up "static-ens161" Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/7) |
설정된 연결 확인(down, disconnect 되어있는 연결까지 확인)
1 2 3 4 | # nmcli con show NAME UUID TYPE DEVICE static-ens161 3ae21aaf-cd1a-4448-bfdf-d85b5693823d ethernet ens161 virbr0 d3f998fd-8b0e-44e5-83f9-b0fe7ca669fb bridge virbr0 |
추가 참조 2. 연결 up, down 명령
ens224 연결 해제(down) 후 확인(ifdown 명령)
1 2 3 4 5 6 7 8 9 10 | # ifdown ens224 Device 'ens224' successfully disconnected. # ifconfig ens224 ens224: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether 00:0c:29:7b:b2:1e txqueuelen 1000 (Ethernet) RX packets 318 bytes 48671 (47.5 KiB) RX errors 0 dropped 38 overruns 0 frame 0 TX packets 121 bytes 11206 (10.9 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
ens224 연결(up) 후 확인(ifup 명령)
1 2 3 4 5 6 7 8 9 10 11 12 | # ifup ens224 Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/8) # ifconfig ens224 ens224: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.10.10.10 netmask 255.255.255.255 broadcast 10.10.10.10 inet6 fe80::1c49:b64a:503c:8c9 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:7b:b2:1e txqueuelen 1000 (Ethernet) RX packets 319 bytes 48731 (47.5 KiB) RX errors 0 dropped 38 overruns 0 frame 0 TX packets 137 bytes 14011 (13.6 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 |
참조 : https://yangnoon.tistory.com/39
'Linux, Unix > Tip' 카테고리의 다른 글
Oracle Linux 8 언어설정 변경 locale (0) | 2021.01.13 |
---|---|
Oracle Linux 7 새로넣은 디스크 mount 시키기 (0) | 2020.09.25 |
리눅스에서 ifconfig 명령 시 나오는 virbr0, lo 란? (0) | 2020.08.22 |
Oracle Linux 7 NTP 설정 (0) | 2020.07.07 |
find 명령에서 제외하고 검색 (0) | 2020.06.04 |