2020-06-02

주요 명령어


sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

route del default gw _gateway eth0
vconfig add eth0 101
vconfig add eth0 102
udhcpc -i eth0.101
ifconfig eth0.102 192.168.102.1 netmask 255.255.255.0 broadcast 192.168.102.255 up
route add default gw _gateway eth0.101

iptables -P FORWARD ACCEPT
iptables --table nat -A POSTROUTING -o eth0.101 -j MASQUERADE

ip link add link eth0 name eth0.101 type vlan id 101

//sd카드에 쓰기
bunzip2 -dk -f core-image-full-cmdline-imx6ull14x14evk.sdcard.bz2
sudo dd if=core-image-full-cmdline-imx6ull14x14evk.sdcard of=/dev/sdd bs=1M conv=fsync


댓글 2개:

[siwg917] 공유기 mac 얻기, arp table에서 확인.

1. arp 요청함수. #include "lwip/netif.h" #include "lwip/ip4_addr.h" #include "lwip/etharp.h" #define ARP_RETRY...