Posts

Showing posts with the label Linux

Modifying Network Connection in Linux

Image
Network ကို configuration လုပ္ေတာ့မယ္ဆိုရင္ network interfaces ေတြရဲ့ configuration files ေတြကိုျပုျပင္ျခင္းနဲ့လည္းလုပ္လို့ရပါတယ္။ interface configuration file ဆိုတာကေတာ့ network devices ေတြရဲ့ software interfaces ေတြကို control လုပ္တဲ့ files ေတြကိုေျပာတာပါ။ဒီ file ေတြကိုမ်ားေသာအားျဖင့္ /etc/sysconfig/network-scripts/ifcfg-<name> ဆိုတဲ့ေနရာမွာထားပါတယ္။ <name> ဆိုတာကေတာ့ device ေတြရဲ့ interface name ကိုေျပာတာပါ။ေအာက္ကဇယားက variables ေတြကေတာ့ interface ေတြကို static (or) dynamic configuration လုပ္တဲ့အခ်ိန္မွာသံုးတဲ့variables ေတြပါ။ ပံုထဲမွာဆိုရင္ ip address, prefix, gateway ေတြ၊ DNS အတြက္ numbers ေတြကို assign လုပ္ေပးထားတာကိုျမင္ရမွာပါ။ configuration file ကို ျပုျပင္ျပီးရင္ေတာ့ nmcli con reload ဆိုတဲ့ command နဲ့ NetworkManager က configuration file ကို read လုပ္ေအာင္လုပ္ေပးရပါမယ္။အဲ့လုိလုပ္ျပီးတဲ့အခါမွာ interfaces ေတြကိုလည္း restart လုပ္ဖို့လိုအပ္ပါေသးတယ္။ [root@demo ~]# nmcli con reload [root@demo ~]# nmcli con down "System eth0" [root@demo ~]# nmcli co...