Skip to content

Commit

Permalink
shubh-networking
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-yadavv committed Jan 29, 2022
1 parent fc508bf commit 4bb1755
Show file tree
Hide file tree
Showing 5,629 changed files with 691,925 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
55 changes: 55 additions & 0 deletions Shubham-Yadav/01-Networking/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
## Introduction

### internet
- the internet is a global network of computers and devices that can be reached by any device on the internet.

### server
- a server is a computer that stores data and services.

### client
- a client is a computer that sends requests to a server.
- a client can be a web browser, a mobile device, a desktop application, or a command line interface.

### protocol
- a protocol is a set of rules that describes how a client and server communicate.


an ip address is a number that identifies a device on the internet.

- **LAN** - local area network
- **MAN** - metropolitian area network
- **WAN** - wide area network

### topologies
1. Bus topology
2. Ring topology
3. STAR topology
4. TREE topology
5. MESH topology

## structure of network:

## OSI model (Open System Interconnection Model)
- OSI model is a layered model of computer networks.

### layers of OSI model
- physical layer
- link layer
- network layer
- transport layer
- session layer
- presentation layer
- application layer

there is a another model called TCP/IP model.
a TCP/IP model is a layered model of computer networks.

### layers of TCP/IP model
- physical layer
- data link layer
- network layer
- transport layer
- application layer

### client server architecture
The client-server model describes how a server provides resources and services to one or more clients. Examples of servers include web servers, mail servers, and file servers. Each of these servers provide resources to client devices, such as desktop computers, laptops, tablets, and smartphones.
4 changes: 4 additions & 0 deletions Shubham-Yadav/02-linux/copy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
basic linux commands

cat > new.txt

90 changes: 90 additions & 0 deletions Shubham-Yadav/02-linux/linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Types of shells
* Bourne shell (sh shell)
* C shell (csh shell)
* Z shell (zsh shell)
* Bourne again shell (bash shell)

# linux commands

### basic commands
1. `echo` - print a string
2. `ls` - list files in a directory
3. `cd` - change directory
4. `pwd` - print working directory
5. `mkdir` - make a directory
6. `rmdir` - remove a directory
7. `rm` - remove a file
8. `cp` - copy a file
9. `mv` - move a file
10. `cat` - concatenate files and print on the standard output
11. `grep` - search for a pattern in a file

### User accounts
1. `whoami` - print the name of the current user
2. `id` - print the user ID of the current user
3. `sudo` - run a command as root
4. `su` - run a command as another user

### Download files
1. `curl <url>` - download a file from the internet
2. `wget <url>` - download a file from the internet


### Check OS version
1. `uname -a` - print operating system information
2. `lsb_release -a` - print operating system information

# Package managers
RPM: Red Hat Package Manager

1. `rpm -i <package>` - install a package
2. `rpm -e <package>` - remove a package
3. `rpm -q <package>` - query a package

YUM: Yum Package Manager
1. `yum install <package>` - install a package
2. `yum remove <package>` - remove a package
3. `yum list <package>` - query a package
4. `yum repolist` - list available repositories

# Services
1. `service <service> start` - start a service
2. `systemctl start <service>` - start a service
3. `systemctl stop <service>` - stop a service
4. `systemctl status <service>` - check the status of a service
5. `systemctl enable <service>` - enable a service to start at boot
6. `systemctl disable <service>` - disable a service to start at boot


# VI editor
1. `vi <file>` - open a file in vi editor
2. to switch to insert mode: `i`
3. to switch to command mode: `esc`
4. to switch to visual mode: `v`
5. to switch to replace mode: `r`
6. to delete a character: `x`
7. to delete a line: `dd`
8. to delete a word: `dw`
9. to copy a line: `yy`
10. to paste a line: `p`
11. to save a file: `:wq`
12. to quit vi: `:q`
13. to quit vi without saving: `:wq!`
14. to quit vi and exit: `:q!`

# Networking
1. `ifconfig` - print network interface configuration
2. `route` - print routing table
3. `netstat` - print network statistics
4. `ping <host>` - send ICMP echo request to a host
5. `traceroute <host>` - trace the route to a host
6. `dig <host>` - query DNS information
7. `nslookup <host>` - query DNS information
8. `nmap <host>` - scan a network
9. `ss` - print network statistics

# Routing
1. `route add -net <network> <gateway>` - add a route
2. `route del -net <network>` - delete a route
3. `route add -host <host> <gateway>` - add a route

45 changes: 45 additions & 0 deletions Shubham-Yadav/03-Yaml/datatypes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# String variables
myself: Kunal Kushwaha
fruit: "apple"
job: 'swe'

bio: |
hey my name is shubham.

# write a single line in multiple lines
message: >
this will
all be
in one single line

# same as
message: !!str this will all be in one single line

number: 5473
marks: 98.76
booleanValue: !!bool No # n, N, false, False, FALSE
# same for true -> yes, y, Y

# specify the type
zero: !!int 0
positiveNum: !!int 45
negativeNum: !!int -45
binaryNum: !!int 0b11001
octalNum: !!int 06574
hexa: !!int 0x45
commaValue: !!int +540_000 # 540,000
exponential numbers: 6.023E56

# floating point numbers
marks: !!float 56.89
infinite: !!float .inf
not a num: .nan

# null
surname: !!null Null # or null NULL ~
~: this is a null key

# dates and time
date: !!timestamp 2002-12-14
india time: 2001-12-15T02:59:43.10 +5:30
no time zone: 2001-12-15T02:59:43.10
29 changes: 29 additions & 0 deletions Shubham-Yadav/03-Yaml/kubernetes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiversion: v1
kind: pod
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.7.9
ports:
- containerPort: 80
volumeMounts:
- name: nginx-config
mountPath: /etc/nginx
volumes:
- name: nginx-config
configMap:
name: nginx-config
items:
- key: nginx.conf
path: nginx.conf
- key: nginx.conf
path: nginx.conf
- name: sidecar-config
configMap:
name: sidecar-config
image: curl:1.7.9
command: ["/bin/sh", "-c", "echo 'hello'"]
24 changes: 24 additions & 0 deletions Shubham-Yadav/03-Yaml/list.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
microservice:
- app: user-authenication
port: 3000
version: 1.7
deployed: false

micro:
- app: user-authenication
port: 3000
version: [1.7, 1.8]


data:
- app: user-authenication
port: 3000
version: 1.7
deployed: yes
- app: cart
port: 3000
versions:
- 1.7
- 1.8
- 1.9

4 changes: 4 additions & 0 deletions Shubham-Yadav/03-Yaml/object.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
microservice:
app: user-authenication
port: 3000
version: 1.7
5 changes: 5 additions & 0 deletions Shubham-Yadav/03-Yaml/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# comment here
app: user-authenication
port: 3000
version: 1.7

Loading

0 comments on commit 4bb1755

Please sign in to comment.