![CentOS 7 PPPoE 및 Vlan이 이상한 동작을 태그함](https://rvso.com/image/1654373/CentOS%207%20PPPoE%20%EB%B0%8F%20Vlan%EC%9D%B4%20%EC%9D%B4%EC%83%81%ED%95%9C%20%EB%8F%99%EC%9E%91%EC%9D%84%20%ED%83%9C%EA%B7%B8%ED%95%A8.png)
CentOS 7.7 최소에서 ISP 모뎀(ISP: Unifi, Malaysia)으로 PPPoE 연결을 시도하고 있습니다.
먼저 아래와 같이 eno1.500인 인터페이스 상단에 ifcfg 태그가 붙은 VLAN(ID: 500) 파일을 만들었습니다.
IPV6INIT="yes"
DNS2="1.1.1.1"
DNS1="8.8.8.8"
IPV6_AUTOCONF="yes"
BOOTPROTO="dhcp"
ONBOOT="yes"
UUID="Same as default ifcfg of eno1"
DEVICE="eno1.500"
VLAN="yes"
그런 다음 rp-pppoe를 사용하여 PPPoE 설정을 처리했으며 올바른 PPPoE 사용자 이름과 비밀번호를 사용하여 VLAN 태그가 지정된 인터페이스(eno1.500)도 지정했습니다.
여기서 PPPoE 연결이 약 몇 초 동안만 지속된다는 사실을 알았을 때 이상한 결과가 나왔습니다. 로그는 다음과 같습니다.
Remote Message: Authentication success,Welcome!
PAP authentication succeeded
local IP address xxx
remote IP address: xxx
recv (receivePacket): Network is down
recv (receivePacket): Network is down
Modem hangup
Connect time 0.7 minutes.
Connection terminated.
그런 다음 재귀적으로:
Remote Message: Authentication success,Welcome!
PAP authentication failed.
Modem hangup
Connection terminated.
때로는 PAP가 성공적으로 다시 연결되었다가 나중에 실패하는 경우도 있습니다.
답변1
대신 ip 명령을 사용하여 vlan 인터페이스를 추가하기로 결정했습니다(vlan id: 500).
$ ip link add link eno1 name eno1.500 type vlan id 500
재부팅할 때마다 설정을 유지하기 위해 아래에 명령을 추가했습니다 /etc/rc.local
.
그런 다음 pppoe-setup을 실행하고 태그가 지정된 인터페이스 eno1.500을 가리킵니다.
깨끗하지 않을 수도 있지만 지금은 나에게 효과적입니다.