2021-04-01-Thu-Study

» study

Network

system(command); 
    --> execute command
    ex) system(sudo iwconfig), system(sudo ifconfig)

Setting up ad-hoc network
http://mpc.ece.utexas.edu/pctb/drivers/os/adhoc-network-setup.html 

1. p2p ad-hoc
    Peer-to-peer (P2P) computing or networking is a distributed application architecture that partitions tasks or workloads between peers.
    
    Ad hoc: decentralized type of wireless network, that does not rely on a pre-existing infrastructure such as routers and access points

2. SSID, ESSID
    SSID: In wireless LAN, SSID is used to identify the access point of the connection destination.

    ESSID is an extension that can be used even for networks in which multiple access points are installed.


4. AF_INET, PF_INET 
    When expressing the protocol system, PF_INET is used and
    When expressing the address system, AF_INET is used.

Command
    iwconfig command
        sudo iwconfig [interface_name] mode [ad-hoc]
        sudo iwconfig [interface_name] channel [6]
        sudo iwconfig [interface_name] essid [odroid-adhoc]
        sudo iwconfig [interface_name] key [pwd-adhoc]

        essid: Network name = Net ID
    ifconfig command
        sudo ifconfig [interface_name] [up-or-down] 

    ip command
        sudo ip link set [interface_name] [up]
            -> The up flag with interface name (eth1) enables a network interface
            
        sudo ip addr add [address] [interface_name]
            -> used to assign IP Address to a specific interface